Skip to content

AI API reference

Access all Quant AI features programmatically via the v3 REST API. This page provides an overview of available endpoints organised by category.

All AI endpoints share the following base URL.

https://api.quantcdn.io/api/v3/organisations/{org}/ai

Replace {org} with your organisation identifier.

Include your project API token as a Bearer token in the Authorization header.

Terminal window
curl -H "Authorization: Bearer YOUR_API_TOKEN" \
https://api.quantcdn.io/api/v3/organisations/{org}/ai/models

Find your API token in the Integrations section of your project dashboard.

MethodEndpointDescription
GET/modelsList available AI models
GET/models/{modelId}Get model details and capabilities

Filter models by capability using query parameters: chat, embeddings, vision, streaming.

MethodEndpointDescription
POST/chatSend a chat message (buffered response)
POST/chat/streamSend a chat message (streaming SSE response)
GET/chat/executions/{id}Poll for async execution result
POST/chat/callbackResume a durable execution

Example chat request:

Terminal window
curl -X POST https://api.quantcdn.io/api/v3/organisations/{org}/ai/chat \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"modelId": "anthropic.claude-sonnet-4-20250514-v1:0",
"messages": [{"role": "user", "content": "Hello"}],
"maxTokens": 1024
}'
MethodEndpointDescription
POST/embeddingsGenerate text embeddings
MethodEndpointDescription
POST/image-generationGenerate images from text prompts
MethodEndpointDescription
GET/sessionsList sessions
POST/sessionsCreate a session
GET/sessions/{id}Get session details
PUT/sessions/{id}Update a session
DELETE/sessions/{id}Delete a session
PUT/sessions/{id}/extendExtend session TTL
MethodEndpointDescription
GET/agentsList agents
POST/agentsCreate an agent
GET/agents/{id}Get agent details
PUT/agents/{id}Update an agent
DELETE/agents/{id}Delete an agent
POST/agents/{id}/chatChat with an agent
MethodEndpointDescription
GET/custom-toolsList custom tools
POST/custom-toolsRegister a custom tool
DELETE/custom-tools/{id}Delete a custom tool
GET/tools/executions/{id}Get tool execution status
MethodEndpointDescription
GET/vector-db/collectionsList collections
POST/vector-db/collectionsCreate a collection
DELETE/vector-db/collections/{id}Delete a collection
POST/vector-db/collections/{id}/documentsUpload documents
DELETE/vector-db/collections/{id}/documentsDelete documents
POST/vector-db/collections/{id}/querySearch a collection
MethodEndpointDescription
GET/tasksList tasks
POST/tasksCreate a task
GET/tasks/{id}Get task details
PUT/tasks/{id}Update a task
DELETE/tasks/{id}Delete a task
GET/tasks/{id}/dependency-graphGet task dependency graph
MethodEndpointDescription
GET/orchestrationsList orchestrations
POST/orchestrationsCreate an orchestration
DELETE/orchestrations/{id}Delete an orchestration
POST/orchestrations/{id}/startStart an orchestration
POST/orchestrations/{id}/pausePause an orchestration
POST/orchestrations/{id}/resumeResume an orchestration
POST/orchestrations/{id}/cancelCancel an orchestration
GET/orchestrations/{id}/batchesList orchestration batches
MethodEndpointDescription
GET/filesList files
POST/filesUpload a file
DELETE/files/{id}Delete a file
MethodEndpointDescription
GET/usageGet usage statistics

The /chat/stream endpoint returns Server-Sent Events (SSE). Each event contains a chunk of the response.

data: {"type":"content","content":"Hello"}
data: {"type":"content","content":" there!"}
data: {"type":"done"}

For long-running operations, set async: true in your chat request. Poll with GET /chat/executions/{id} until the status is completed, then retrieve the result.

Terminal window
# Start an async chat request
curl -X POST https://api.quantcdn.io/api/v3/organisations/{org}/ai/chat \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"modelId": "anthropic.claude-sonnet-4-20250514-v1:0",
"messages": [{"role": "user", "content": "Analyse this dataset..."}],
"async": true
}'
# Poll for the result
curl https://api.quantcdn.io/api/v3/organisations/{org}/ai/chat/executions/{id} \
-H "Authorization: Bearer YOUR_API_TOKEN"