AI API
LLM inference and chat completions
REST API endpoints for AI. 31 operations.
Generate speech
POST /v1/ai/audio/speechSynthesizes audio from text (text-to-speech).
Auth: Bearer API key
Request body
application/json (required) — schema object.
Responses
| Status | Description |
|---|---|
200 | Synthesized audio |
401 | Missing or invalid API key |
500 | Internal error |
operationId: generateSpeech
Transcribe audio
POST /v1/ai/audio/transcriptionsConverts an uploaded audio file to text (speech-to-text).
Auth: Bearer API key
Request body
multipart/form-data (required) — schema object.
Responses
| Status | Description |
|---|---|
200 | Transcription result |
401 | Missing or invalid API key |
500 | Internal error |
operationId: transcribeAudio
Create a chat completion
POST /v1/ai/chat/completionsRuns an OpenAI-compatible chat completion and returns the model's response.
Auth: Bearer API key
Request body
application/json (required) — schema ChatCompletionRequest.
Responses
| Status | Description |
|---|---|
200 | Completion response |
401 | Missing or invalid API key |
402 | Budget exhausted |
500 | Internal error |
503 | All providers exhausted |
operationId: chatCompletion
Stream a chat completion
POST /v1/ai/chat/completions/streamRuns 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
| Status | Description |
|---|---|
200 | Server-sent event stream of completion chunks |
401 | Missing or invalid API key |
402 | Budget exhausted |
500 | Internal error |
503 | All providers exhausted |
operationId: streamChatCompletion
Generate a document
POST /v1/ai/docgen/createGenerates a document from the supplied request.
Auth: Bearer API key
Request body
application/json (required) — schema object.
Responses
| Status | Description |
|---|---|
200 | Generated document |
401 | Missing or invalid API key |
500 | Internal error |
operationId: createDocgen
Download a generated document
GET /v1/ai/docgen/download/{doc_id}Downloads the generated document file by id.
Auth: Bearer API key
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
doc_id | path | string | Yes | Document id |
Responses
| Status | Description |
|---|---|
200 | Document file download |
401 | Missing or invalid API key |
500 | Internal error |
operationId: downloadDocgen
List docgen formats
GET /v1/ai/docgen/formatsReturns the output formats supported by document generation.
Auth: Bearer API key
Responses
| Status | Description |
|---|---|
200 | Supported output formats |
401 | Missing or invalid API key |
500 | Internal error |
operationId: listDocgenFormats
Get docgen history
GET /v1/ai/docgen/historyReturns the caller's document-generation history.
Auth: Bearer API key
Responses
| Status | Description |
|---|---|
200 | Document generation history |
401 | Missing or invalid API key |
500 | Internal error |
operationId: getDocgenHistory
Preview a generated document
POST /v1/ai/docgen/previewReturns a preview of a document without finalizing it.
Auth: Bearer API key
Request body
application/json (required) — schema object.
Responses
| Status | Description |
|---|---|
200 | Document preview |
401 | Missing or invalid API key |
500 | Internal error |
operationId: previewDocgen
Revise a generated document
POST /v1/ai/docgen/reviseApplies revisions to a previously generated document.
Auth: Bearer API key
Request body
application/json (required) — schema object.
Responses
| Status | Description |
|---|---|
200 | Revised document |
401 | Missing or invalid API key |
500 | Internal error |
operationId: reviseDocgen
Get docgen status
GET /v1/ai/docgen/statusReturns the status of the document-generation subsystem.
Auth: Bearer API key
Responses
| Status | Description |
|---|---|
200 | Docgen subsystem status |
401 | Missing or invalid API key |
500 | Internal error |
operationId: getDocgenStatus
List docgen templates
GET /v1/ai/docgen/templatesReturns the available document-generation templates.
Auth: Bearer API key
Responses
| Status | Description |
|---|---|
200 | Available document templates |
401 | Missing or invalid API key |
500 | Internal error |
operationId: listDocgenTemplates
List document versions
GET /v1/ai/docgen/versions/{doc_id}Returns the version history of a generated document.
Auth: Bearer API key
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
doc_id | path | string | Yes | Document id |
Responses
| Status | Description |
|---|---|
200 | Document versions |
401 | Missing or invalid API key |
500 | Internal error |
operationId: listDocgenVersions
Create embeddings
POST /v1/ai/embeddingsGenerates vector embeddings for the supplied input (OpenAI-compatible).
Auth: Bearer API key
Request body
application/json (required) — schema object.
Responses
| Status | Description |
|---|---|
200 | Embedding vectors |
401 | Missing or invalid API key |
500 | Internal error |
operationId: createEmbeddings
Generate images
POST /v1/ai/images/generationsGenerates one or more images from a text prompt.
Auth: Bearer API key
Request body
application/json (required) — schema object.
Responses
| Status | Description |
|---|---|
200 | Generated image(s) |
401 | Missing or invalid API key |
500 | Internal error |
operationId: generateImage
List AI models
GET /v1/ai/modelsReturns the AI models available to the caller.
Auth: Bearer API key
Responses
| Status | Description |
|---|---|
200 | Model list |
401 | Missing or invalid API key |
500 | Internal error |
operationId: listModels
List RAG documents
GET /v1/ai/rag/documentsReturns the documents indexed for retrieval-augmented generation.
Auth: Bearer API key
Responses
| Status | Description |
|---|---|
200 | List of indexed documents |
401 | Missing or invalid API key |
500 | Internal error |
operationId: listRagDocuments
Delete a RAG document
DELETE /v1/ai/rag/documents/{doc_id}Removes a document from the retrieval-augmented generation index.
Auth: Bearer API key
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
doc_id | path | string | Yes | Document id |
Responses
| Status | Description |
|---|---|
200 | Document deleted |
401 | Missing or invalid API key |
500 | Internal error |
operationId: deleteRagDocument
Query RAG documents
POST /v1/ai/rag/queryRuns a retrieval-augmented query over indexed documents and returns scored matches.
Auth: Bearer API key
Request body
application/json (required) — schema object.
Responses
| Status | Description |
|---|---|
200 | Query results with similarity scores |
401 | Missing or invalid API key |
500 | Internal error |
operationId: queryRag
Get RAG status
GET /v1/ai/rag/statusReturns the status of the retrieval-augmented generation subsystem.
Auth: Bearer API key
Responses
| Status | Description |
|---|---|
200 | RAG subsystem status |
401 | Missing or invalid API key |
500 | Internal error |
operationId: getRagStatus
Upload a RAG document
POST /v1/ai/rag/uploadUploads and indexes a document for retrieval-augmented generation.
Auth: Bearer API key
Request body
multipart/form-data (required) — schema object.
Responses
| Status | Description |
|---|---|
200 | Uploaded document metadata |
401 | Missing or invalid API key |
500 | Internal error |
operationId: uploadRagDocument
Run web research
POST /v1/ai/researchAnswers a question using live web research and returns the answer with sources.
Auth: Bearer API key
Request body
application/json (required) — schema object.
Responses
| Status | Description |
|---|---|
200 | Research answer with sources |
401 | Missing or invalid API key |
500 | Internal error |
operationId: runResearch
Run deep web research
POST /v1/ai/research/deepRuns 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
| Status | Description |
|---|---|
200 | Deep research answer with sources |
401 | Missing or invalid API key |
500 | Internal error |
operationId: runDeepResearch
Run a research search
POST /v1/ai/research/searchPerforms a web research search and returns matching results.
Auth: Bearer API key
Request body
application/json (required) — schema object.
Responses
| Status | Description |
|---|---|
200 | Search results |
401 | Missing or invalid API key |
500 | Internal error |
operationId: searchResearch
Get research status
GET /v1/ai/research/statusReturns the status of the web research subsystem.
Auth: Bearer API key
Responses
| Status | Description |
|---|---|
200 | Research subsystem status |
401 | Missing or invalid API key |
500 | Internal error |
operationId: getResearchStatus
Autocomplete text
POST /v1/ai/text/autocompleteReturns completion suggestions for the supplied text.
Auth: Bearer API key
Request body
application/json (required) — schema object.
Responses
| Status | Description |
|---|---|
200 | Completion suggestions |
401 | Missing or invalid API key |
500 | Internal error |
operationId: autocompleteText
Check grammar
POST /v1/ai/text/grammarReturns grammar corrections for the supplied text.
Auth: Bearer API key
Request body
application/json (required) — schema object.
Responses
| Status | Description |
|---|---|
200 | Grammar corrections |
401 | Missing or invalid API key |
500 | Internal error |
operationId: checkGrammar
Analyze sentiment
POST /v1/ai/text/sentimentReturns the sentiment of the supplied text.
Auth: Bearer API key
Request body
application/json (required) — schema object.
Responses
| Status | Description |
|---|---|
200 | Sentiment result |
401 | Missing or invalid API key |
500 | Internal error |
operationId: analyzeSentiment
Summarize text
POST /v1/ai/text/summarizeReturns a summary of the supplied text.
Auth: Bearer API key
Request body
application/json (required) — schema object.
Responses
| Status | Description |
|---|---|
200 | Summary |
401 | Missing or invalid API key |
500 | Internal error |
operationId: summarizeText
Translate text
POST /v1/ai/text/translateTranslates the supplied text to a target language.
Auth: Bearer API key
Request body
application/json (required) — schema object.
Responses
| Status | Description |
|---|---|
200 | Translated text |
401 | Missing or invalid API key |
500 | Internal error |
operationId: translateText
Run in-context vector search
POST /v1/ai/text/vector-searchRuns a vector similarity search over supplied in-context text.
Auth: Bearer API key
Request body
application/json (required) — schema object.
Responses
| Status | Description |
|---|---|
200 | Vector search results |
401 | Missing or invalid API key |
500 | Internal error |
operationId: textVectorSearch