Skip to main content
POST
/
ai
/
v1
/
complete
Generate a response for the provided conversation messages
curl --request POST \
  --url https://{workspaceId}.clinia.cloud/ai/v1/complete \
  --header 'Content-Type: application/json' \
  --header 'X-Clinia-API-Key: <api-key>' \
  --data '{
  "agent": "medical-librarian",
  "tools": {
    "data-partition-retriever": {
      "partitions": [
        {
          "key": "<string>",
          "description": "<string>",
          "collectionKeys": [
            "<string>"
          ]
        }
      ]
    }
  },
  "messages": [
    {
      "role": "user",
      "id": "<string>",
      "content": "<string>",
      "parts": [
        {
          "type": "text",
          "text": "<string>"
        }
      ]
    }
  ]
}'
[
  {
    "role": "user",
    "id": "<string>",
    "parts": [
      {
        "type": "text",
        "text": "<string>"
      }
    ]
  }
]

Authorizations

X-Clinia-API-Key
string
header
required

Body

application/json
agent
enum<string>
required
Available options:
medical-librarian
messages
object[]
required
  • Option 1
  • Option 2
tools
object

Response

A successful response.

The list of new messages added to the conversation. This will only include the assistant message.

  • Option 1
  • Option 2
role
enum<string>
required
Available options:
user,
assistant
id
string
parts
object[]
  • Option 1
  • Option 2
I