Summarize
POST/summarize
This endpoint has been deprecated and may be replaced or removed in future versions of the API.
Will summarize a document using a specific model. This interface is deprecated and will be removed in a later version. New methodologies for processing Summarization tasks will be provided before this is removed.
Request
Query Parameters
Setting this to True, will signal to the API that you intend to be nice to other users by de-prioritizing your request below concurrent ones.
- application/json
Bodyrequired
Optional parameter that specifies which datacenters may process the request.
You can either set the parameter to "aleph-alpha" or omit it (defaulting to null
).
Not setting this value, or setting it to null
, gives us maximal flexibility in processing your request in our
own datacenters and on servers hosted with other providers. Choose this option for maximum availability.
Setting it to "aleph-alpha" allows us to only process the request in our own datacenters. Choose this option for maximal data privacy.
Possible values: [aleph-alpha
, null
]
document objectrequired
Responses
- 200
OK
- application/json
- Schema
- Example (auto)
Schema
model name and version (if any) of the used model for inference
Summary of the document. For longer documents, this may be a bulleted list of summaries for sections of the document.
{
"summary": "All people love food",
"model_version": "2021-12"
}
Authorization: http
name: tokentype: httpscheme: bearerdescription: Can be generated in your [Aleph Alpha profile](https://app.aleph-alpha.com/profile)
- csharp
- curl
- dart
- go
- http
- java
- javascript
- kotlin
- c
- nodejs
- objective-c
- ocaml
- php
- powershell
- python
- r
- ruby
- rust
- shell
- swift
- HTTPCLIENT
- RESTSHARP
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://docs.aleph-alpha.com/summarize");
request.Headers.Add("Accept", "application/json");
request.Headers.Add("Authorization", "Bearer <token>");
var content = new StringContent("{\n \"model\": \"luminous-extended\",\n \"document\": {\n \"text\": \"Some people like pizza more than burgers. Other people don't. But we all love food.\"\n }\n}", null, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());