Skip to main content

Detokenize

POST 

https://api.aleph-alpha.com/detokenize

Detokenize a list of tokens into a string. To obtain a valid model, use GET /models_available.

Request

Responses

OK

Authorization: http

name: tokentype: httpscheme: bearerdescription: Can be generated in your [Aleph Alpha profile](https://app.aleph-alpha.com/profile)
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://api.aleph-alpha.com/detokenize");
request.Headers.Add("Accept", "application/json");
request.Headers.Add("Authorization", "Bearer <TOKEN>");
var content = new StringContent("{\n \"model\": \"luminous-base\",\n \"token_ids\": [\n 560,\n 34438,\n 246,\n 1966,\n 18075,\n 275,\n 8809,\n 3476,\n 17\n ]\n}", null, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
Request Collapse all
Base URL
https://api.aleph-alpha.com
Auth
Body required
{
  "model": "luminous-base",
  "token_ids": [
    560,
    34438,
    246,
    1966,
    18075,
    275,
    8809,
    3476,
    17
  ]
}
ResponseClear

Click the Send API Request button above and see the response here!