ScalixScalix Docs

AI API

LLM inference and chat completions

REST API endpoints for AI. 31 operations.

Generate speech

plaintext
POST /v1/ai/audio/speech

Synthesizes audio from text (text-to-speech).

Auth: Bearer API key

Request body

application/json (required) — schema object.

Responses

StatusDescription
200Synthesized audio
401Missing or invalid API key
500Internal error

operationId: generateSpeech

Transcribe audio

plaintext
POST /v1/ai/audio/transcriptions

Converts an uploaded audio file to text (speech-to-text).

Auth: Bearer API key

Request body

multipart/form-data (required) — schema object.

Responses

StatusDescription
200Transcription result
401Missing or invalid API key
500Internal error

operationId: transcribeAudio

Create a chat completion

plaintext
POST /v1/ai/chat/completions

Runs an OpenAI-compatible chat completion and returns the model's response.

Auth: Bearer API key

Request body

application/json (required) — schema ChatCompletionRequest.

Responses

StatusDescription
200Completion response
401Missing or invalid API key
402Budget exhausted
500Internal error
503All providers exhausted

operationId: chatCompletion

Stream a chat completion

plaintext
POST /v1/ai/chat/completions/stream

Runs an OpenAI-compatible chat completion and streams the response as server-sent events.

Auth: Bearer API key

Request body

application/json (required) — schema ChatCompletionRequest.

Responses

StatusDescription
200Server-sent event stream of completion chunks
401Missing or invalid API key
402Budget exhausted
500Internal error
503All providers exhausted

operationId: streamChatCompletion

Generate a document

plaintext
POST /v1/ai/docgen/create

Generates a document from the supplied request.

Auth: Bearer API key

Request body

application/json (required) — schema object.

Responses

StatusDescription
200Generated document
401Missing or invalid API key
500Internal error

operationId: createDocgen

Download a generated document

plaintext
GET /v1/ai/docgen/download/{doc_id}

Downloads the generated document file by id.

Auth: Bearer API key

Parameters

NameInTypeRequiredDescription
doc_idpathstringYesDocument id

Responses

StatusDescription
200Document file download
401Missing or invalid API key
500Internal error

operationId: downloadDocgen

List docgen formats

plaintext
GET /v1/ai/docgen/formats

Returns the output formats supported by document generation.

Auth: Bearer API key

Responses

StatusDescription
200Supported output formats
401Missing or invalid API key
500Internal error

operationId: listDocgenFormats

Get docgen history

plaintext
GET /v1/ai/docgen/history

Returns the caller's document-generation history.

Auth: Bearer API key

Responses

StatusDescription
200Document generation history
401Missing or invalid API key
500Internal error

operationId: getDocgenHistory

Preview a generated document

plaintext
POST /v1/ai/docgen/preview

Returns a preview of a document without finalizing it.

Auth: Bearer API key

Request body

application/json (required) — schema object.

Responses

StatusDescription
200Document preview
401Missing or invalid API key
500Internal error

operationId: previewDocgen

Revise a generated document

plaintext
POST /v1/ai/docgen/revise

Applies revisions to a previously generated document.

Auth: Bearer API key

Request body

application/json (required) — schema object.

Responses

StatusDescription
200Revised document
401Missing or invalid API key
500Internal error

operationId: reviseDocgen

Get docgen status

plaintext
GET /v1/ai/docgen/status

Returns the status of the document-generation subsystem.

Auth: Bearer API key

Responses

StatusDescription
200Docgen subsystem status
401Missing or invalid API key
500Internal error

operationId: getDocgenStatus

List docgen templates

plaintext
GET /v1/ai/docgen/templates

Returns the available document-generation templates.

Auth: Bearer API key

Responses

StatusDescription
200Available document templates
401Missing or invalid API key
500Internal error

operationId: listDocgenTemplates

List document versions

plaintext
GET /v1/ai/docgen/versions/{doc_id}

Returns the version history of a generated document.

Auth: Bearer API key

Parameters

NameInTypeRequiredDescription
doc_idpathstringYesDocument id

Responses

StatusDescription
200Document versions
401Missing or invalid API key
500Internal error

operationId: listDocgenVersions

Create embeddings

plaintext
POST /v1/ai/embeddings

Generates vector embeddings for the supplied input (OpenAI-compatible).

Auth: Bearer API key

Request body

application/json (required) — schema object.

Responses

StatusDescription
200Embedding vectors
401Missing or invalid API key
500Internal error

operationId: createEmbeddings

Generate images

plaintext
POST /v1/ai/images/generations

Generates one or more images from a text prompt.

Auth: Bearer API key

Request body

application/json (required) — schema object.

Responses

StatusDescription
200Generated image(s)
401Missing or invalid API key
500Internal error

operationId: generateImage

List AI models

plaintext
GET /v1/ai/models

Returns the AI models available to the caller.

Auth: Bearer API key

Responses

StatusDescription
200Model list
401Missing or invalid API key
500Internal error

operationId: listModels

List RAG documents

plaintext
GET /v1/ai/rag/documents

Returns the documents indexed for retrieval-augmented generation.

Auth: Bearer API key

Responses

StatusDescription
200List of indexed documents
401Missing or invalid API key
500Internal error

operationId: listRagDocuments

Delete a RAG document

plaintext
DELETE /v1/ai/rag/documents/{doc_id}

Removes a document from the retrieval-augmented generation index.

Auth: Bearer API key

Parameters

NameInTypeRequiredDescription
doc_idpathstringYesDocument id

Responses

StatusDescription
200Document deleted
401Missing or invalid API key
500Internal error

operationId: deleteRagDocument

Query RAG documents

plaintext
POST /v1/ai/rag/query

Runs a retrieval-augmented query over indexed documents and returns scored matches.

Auth: Bearer API key

Request body

application/json (required) — schema object.

Responses

StatusDescription
200Query results with similarity scores
401Missing or invalid API key
500Internal error

operationId: queryRag

Get RAG status

plaintext
GET /v1/ai/rag/status

Returns the status of the retrieval-augmented generation subsystem.

Auth: Bearer API key

Responses

StatusDescription
200RAG subsystem status
401Missing or invalid API key
500Internal error

operationId: getRagStatus

Upload a RAG document

plaintext
POST /v1/ai/rag/upload

Uploads and indexes a document for retrieval-augmented generation.

Auth: Bearer API key

Request body

multipart/form-data (required) — schema object.

Responses

StatusDescription
200Uploaded document metadata
401Missing or invalid API key
500Internal error

operationId: uploadRagDocument

Run web research

plaintext
POST /v1/ai/research

Answers a question using live web research and returns the answer with sources.

Auth: Bearer API key

Request body

application/json (required) — schema object.

Responses

StatusDescription
200Research answer with sources
401Missing or invalid API key
500Internal error

operationId: runResearch

Run deep web research

plaintext
POST /v1/ai/research/deep

Runs a multi-step deep web research task and returns a synthesized answer with sources.

Auth: Bearer API key

Request body

application/json (required) — schema object.

Responses

StatusDescription
200Deep research answer with sources
401Missing or invalid API key
500Internal error

operationId: runDeepResearch

Run a research search

plaintext
POST /v1/ai/research/search

Performs a web research search and returns matching results.

Auth: Bearer API key

Request body

application/json (required) — schema object.

Responses

StatusDescription
200Search results
401Missing or invalid API key
500Internal error

operationId: searchResearch

Get research status

plaintext
GET /v1/ai/research/status

Returns the status of the web research subsystem.

Auth: Bearer API key

Responses

StatusDescription
200Research subsystem status
401Missing or invalid API key
500Internal error

operationId: getResearchStatus

Autocomplete text

plaintext
POST /v1/ai/text/autocomplete

Returns completion suggestions for the supplied text.

Auth: Bearer API key

Request body

application/json (required) — schema object.

Responses

StatusDescription
200Completion suggestions
401Missing or invalid API key
500Internal error

operationId: autocompleteText

Check grammar

plaintext
POST /v1/ai/text/grammar

Returns grammar corrections for the supplied text.

Auth: Bearer API key

Request body

application/json (required) — schema object.

Responses

StatusDescription
200Grammar corrections
401Missing or invalid API key
500Internal error

operationId: checkGrammar

Analyze sentiment

plaintext
POST /v1/ai/text/sentiment

Returns the sentiment of the supplied text.

Auth: Bearer API key

Request body

application/json (required) — schema object.

Responses

StatusDescription
200Sentiment result
401Missing or invalid API key
500Internal error

operationId: analyzeSentiment

Summarize text

plaintext
POST /v1/ai/text/summarize

Returns a summary of the supplied text.

Auth: Bearer API key

Request body

application/json (required) — schema object.

Responses

StatusDescription
200Summary
401Missing or invalid API key
500Internal error

operationId: summarizeText

Translate text

plaintext
POST /v1/ai/text/translate

Translates the supplied text to a target language.

Auth: Bearer API key

Request body

application/json (required) — schema object.

Responses

StatusDescription
200Translated text
401Missing or invalid API key
500Internal error

operationId: translateText

Run in-context vector search

plaintext
POST /v1/ai/text/vector-search

Runs a vector similarity search over supplied in-context text.

Auth: Bearer API key

Request body

application/json (required) — schema object.

Responses

StatusDescription
200Vector search results
401Missing or invalid API key
500Internal error

operationId: textVectorSearch