Skip to main content

Explanation

POST 

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

Better understand the source of a completion, specifically on how much each section of a prompt impacts each token of the completion.

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/explain");
request.Headers.Add("Accept", "application/json");
request.Headers.Add("Authorization", "Bearer <TOKEN>");
var content = new StringContent("{\n \"model\": \"string\",\n \"hosting\": \"aleph-alpha\",\n \"prompt\": \"string\",\n \"target\": \"string\",\n \"control_factor\": 0.1,\n \"contextual_control_threshold\": 0,\n \"control_log_additive\": true,\n \"postprocessing\": \"none\",\n \"normalize\": false,\n \"prompt_granularity\": {\n \"type\": \"token\",\n \"delimiter\": \"string\"\n },\n \"target_granularity\": \"complete\",\n \"control_token_overlap\": \"partial\"\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
Parameters
— query
Body required
{
  "model": "string",
  "hosting": "aleph-alpha",
  "prompt": "string",
  "target": "string",
  "control_factor": 0.1,
  "contextual_control_threshold": 0,
  "control_log_additive": true,
  "postprocessing": "none",
  "normalize": false,
  "prompt_granularity": {
    "type": "token",
    "delimiter": "string"
  },
  "target_granularity": "complete",
  "control_token_overlap": "partial"
}
ResponseClear

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