Skip to main content
POST
/
ai
/
v1
/
summarize
Generate a summary for the provided context
curl --request POST \
  --url https://api.{workspaceId}.clinia.cloud/ai/v1/summarize \
  --header 'Content-Type: application/json' \
  --header 'X-Clinia-API-Key: <api-key>' \
  --data '
{
  "task": "<string>",
  "params": {},
  "targetParam": "hits"
}
'
[
  {
    "role": "user",
    "id": "<string>",
    "parts": [
      {
        "type": "text",
        "text": "<string>"
      }
    ]
  }
]

Authorizations

X-Clinia-API-Key
string
header
required

Body

application/json
task
string
required

The summarization task to perform (e.g. "knowledge-answer").

params
object
required

Key/value inputs for that task, must conform to the JSON-Schema of the chosen task.

retriever
object

When provided, instructs the service how to fetch dynamic parameters from a vector store.

targetParam
string

A param name (e.g. "hits") that will be used to store the results of the retriever. Only necessary if retriever is specified.

Example:

"hits"

Response

A successful response.

role
enum<string>
required
Available options:
user,
assistant
id
string
parts
object[]