AIVAX

AI model inference, document indexing and search.

Helpful links:

  • API endpoint: https://inference.aivax.net/
  • Reference for agents: https://inference.aivax.net/apidocs/llms.txt
  • Documentation/guides: https://docs.aivax.net/
  • Terms of service: https://docs.aivax.net/docs/en/legal/terms-of-service
  • Privacy Policy: https://docs.aivax.net/docs/en/legal/privacy-policy

Tip for agents: send the header X-Response-Truncating: agent-optimized in your request to get a shortened, optimized response for LLMs reading.

Service version: 1

Inference

Get/v1/modelsModel listing
All endpointsInference

Model listing

Returns OpenAI-compatible model entries for models and AI Gateways owned by the authenticated account.

GET/v1/models

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Query parameters:

  • filterstring

    Optional model name. Returns only models whose name matches it exactly or as a dated snapshot, ordered from the closest match.

Get/api/v1/modelsModel listing
All endpointsInference

Model listing

Returns OpenAI-compatible model entries for models and AI Gateways owned by the authenticated account.

GET/api/v1/models

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Query parameters:

  • filterstring

    Optional model name. Returns only models whose name matches it exactly or as a dated snapshot, ordered from the closest match.

Post/v1/chat/completionsInference (chat completions)
All endpointsInference

Inference (chat completions)

Creates an OpenAI-compatible chat completion using an integrated model or an AI Gateway. Supports streaming, tool calls, multimodal messages, response schemas and usage metadata. Note: it is recommended to use the long inference endpoint at https://direct.inference.aivax.net/, because this endpoint may take a while to respond on non-streaming responses.

POST/v1/chat/completions

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

  • Sse-Stream-Options

    Optional. Use no-ping to disable periodic keep-alive events on streaming responses.

Request parameters:

  • $.modelstringRequired

    Integrated model name, AI Gateway identifier or AI Gateway slug.

  • $.messagesarray

    OpenAI-compatible message array. Required unless prompt is supplied.

    Examples:

    User text content

    User message with textual content

    {
        "model": "@google/gemini-3-flash",
        "messages": [
            {
                "role": "user",
                "content": [
                    {
                        "type": "text",
                        "text": "Describe these inputs briefly."
                    }
                ]
            },
            {
                "role": "user",
                "content": "Alternative, short way to input data"
            }
        ]
    }
    Assistant message

    Assistant message with textual content

    {
        "model": "@google/gemini-3-flash",
        "messages": [
            {
                "role": "assistant",
                "content": "How can I help you today?"
            }
        ]
    }
    System message

    System message with instructions for the assistant

    {
        "model": "@google/gemini-3-flash",
        "messages": [
            {
                "role": "system",
                "content": "Answer concisely and in English."
            },
            {
                "role": "user",
                "content": "What is the capital of France?"
            }
        ]
    }
    Tool call result

    Assistant tool call followed by its tool result

    {
        "model": "@google/gemini-3-flash",
        "messages": [
            {
                "role": "assistant",
                "content": null,
                "tool_calls": [
                    {
                        "id": "call_weather_123",
                        "type": "function",
                        "function": {
                            "name": "get_weather",
                            "arguments": "{\"city\":\"Lisbon\",\"unit\":\"celsius\"}"
                        }
                    }
                ]
            },
            {
                "role": "tool",
                "tool_call_id": "call_weather_123",
                "content": "{\"temperature\":21,\"unit\":\"celsius\",\"condition\":\"sunny\"}"
            }
        ]
    }
    User image content

    User message with textual and image content

    {
        "model": "@google/gemini-3-flash",
        "messages": [
            {
                "role": "user",
                "content": [
                    {
                        "type": "text",
                        "text": "What's on this image?"
                    },
                    {
                        "type": "image_url",
                        "image_url": {
                            "url": "data:image/png;base64,SGVsbG8sIHdvcmxkIQ==",
                            "detail": "auto"
                        }
                    },
                    {
                        "type": "image_url",
                        "image_url": {
                            "url": "https://example.com/image.png",
                            "detail": "high"
                        }
                    }
                ]
            }
        ]
    }
    User audio content

    User message with textual and audio content

    {
        "model": "@google/gemini-3-flash",
        "messages": [
            {
                "role": "user",
                "content": [
                    {
                        "type": "text",
                        "text": "Transcribe the following audio."
                    },
                    {
                        "type": "input_audio",
                        "input_audio": {
                            "data": "VGhpcyBpcyBhIHRlc3Qu...",
                            "format": "wav"
                        }
                    }
                ]
            }
        ]
    }
    User video content

    User message with textual and video content

    {
        "model": "@google/gemini-3-flash",
        "messages": [
            {
                "role": "user",
                "content": [
                    {
                        "type": "text",
                        "text": "What happens in the following video?"
                    },
                    {
                        "type": "video_url",
                        "video_url": {
                            "url": "UHJvZ3JhbWFjYW8gZW0gSmF2YQ=="
                        }
                    },
                    {
                        "type": "video_url",
                        "video_url": {
                            "url": "https://example.com/video.mp4"
                        }
                    }
                ]
            }
        ]
    }
    User file/PDF content

    User message with textual and file content

    {
        "model": "@google/gemini-3-flash",
        "messages": [
            {
                "role": "user",
                "content": [
                    {
                        "type": "text",
                        "text": "What's the insights of this report?"
                    },
                    {
                        "type": "file",
                        "file": {
                            "filename": "document.pdf",
                            "file_data": "data:application/pdf;base64,QmFzZTY0IGVuY29kaW5nIGV4YW1wbGU="
                        }
                    },
                    {
                        "type": "file",
                        "file": {
                            "filename": "document.pdf",
                            "file_data": "https://example.com/report.pdf"
                        }
                    }
                ]
            }
        ]
    }
  • $.promptstring | array

    Alias for $.messages. String or OpenAI-compatible message array accepted as an alternative to messages.

  • $.streamboolean

    Streams completion events as text/event-stream when true.

  • $.metadataobject

    Optional string key/value metadata stored with the conversation.

  • $.idempotency_keystring

    Optional key used to reuse the the observability conversation token. Use one id for the each conversation.

  • $.allow_loggingboolean

    Optional. When false, this request is not written to the account conversation logs. Defaults to true; account-level conversation logging still applies.

  • $.userstring

    Optional external user identifier.

  • $.temperaturenumber

    Optional sampling temperature.

  • $.top_pnumber

    Optional nucleus sampling value.

  • $.top_kinteger

    Optional top-k sampling value forwarded to compatible gateways.

  • $.seedinteger

    Optional sampling seed.

  • $.toolsarray

    Optional OpenAI-compatible tool definitions.

    Examples:

    Weather tool

    Function tool that retrieves the current weather for a city

    {
        "model": "@google/gemini-3-flash",
        "messages": [
            {
                "role": "user",
                "content": "What is the current weather in Lisbon?"
            }
        ],
        "tools": [
            {
                "type": "function",
                "function": {
                    "name": "get_weather",
                    "description": "Gets the current weather for a city.",
                    "parameters": {
                        "type": "object",
                        "properties": {
                            "city": {
                                "type": "string",
                                "description": "City name."
                            },
                            "unit": {
                                "type": "string",
                                "enum": [ "celsius", "fahrenheit" ]
                            }
                        },
                        "required": [ "city" ],
                        "additionalProperties": false
                    }
                }
            }
        ]
    }
  • $.tool_choicestring | object

    Optional tool-selection behavior forwarded to compatible gateways.

  • $.builtin_toolsobject

    Optional AIVAX built-in tool selection and options. Include DateTime in tools to expose get_date_time, which takes no arguments and returns date, time, day_of_week (English), time_zone, utc_offset and date_time (ISO 8601).

    Examples:

    Web search and image generation

    AIVAX built-in tools for searching the web and generating an image from the findings

    {
        "model": "@google/gemini-3-flash",
        "messages": [
            {
                "role": "user",
                "content": "Search the web for a recent James Webb Space Telescope discovery, summarize it, and generate an illustration inspired by the findings."
            }
        ],
        "builtin_tools": {
            "tools": [ "WebSearch", "ImageGeneration" ],
            "options": {
                "webSearchMode": "Full",
                "webSearchMaxResults": 5,
                "imageGenerationMaxResults": 1,
                "imageGenerationQuality": "High",
                "imageGenerationAllowMatureContent": false,
                "imageGenerationAllowReferenceUsage": true
            }
        }
    }
  • $.time_zonestring

    Optional IANA time zone, such as America/Sao_Paulo, used by get_date_time, scheduling tools and the Bash tool for this request only. Overrides the AI gateway time zone, which defaults to America/Sao_Paulo. Invalid identifiers are rejected.

  • $.routing_optionsobject

    Optional provider routing for integrated models. Overrides the gateway routing preference for this request only.

    Examples:

    Preferred providers with fallback

    Tries azure-us, then azure-eu, then any available provider, choosing within each step with the Balanced strategy

    {
        "model": "@openai/gpt-6-luna",
        "messages": [
            {
                "role": "user",
                "content": "Summarize this incident report."
            }
        ],
        "routing_options": {
            "preset": "Balanced",
            "allowed_providers": [ "azure/us", "azure/eu", "*" ]
        }
    }
  • $.routing_options.presetstring

    Provider routing strategy: Balanced, Cheapest, Fastest or Quality. Defaults to the gateway routing preference.

  • $.routing_options.allowed_providersarray

    Ordered provider tags tried in sequence, such as azure-us. Use "" to match any provider, usually as the last item. Defaults to [""]; an empty array is rejected. The request fails when none of the listed providers is available.

  • $.routing_presetstring

    Deprecated. Use routing_options.preset instead. When both are sent, routing_options.preset takes precedence.

  • $.reasoning_effortstring

    Optional reasoning effort selector.

  • $.verbositystring

    Optional response verbosity selector.

  • $.max_completion_tokensinteger

    Optional maximum completion tokens.

  • $.max_tokensinteger

    Compatibility alias for max_completion_tokens.

  • $.stopstring | array

    Optional stop sequence or sequences.

  • $.response_formatobject

    Optional OpenAI-compatible structured-output format.

  • $.response_schemaobject

    Optional shorthand JSON schema for structured output.

    Examples:

    JSON healing after a tool call

    Tool result followed by a schema-constrained final response with automatic JSON healing

    {
        "model": "@google/gemini-3-flash",
        "messages": [
            {
                "role": "user",
                "content": "What is the current weather in Lisbon?"
            }
        ],
        "tools": [
            {
                "type": "function",
                "function": {
                    "name": "get_weather",
                    "description": "Gets the current weather for a city.",
                    "parameters": {
                        "type": "object",
                        "properties": {
                            "city": {
                                "type": "string"
                            },
                            "unit": {
                                "type": "string",
                                "enum": [ "celsius", "fahrenheit" ]
                            }
                        },
                        "required": [ "city" ],
                        "additionalProperties": false
                    }
                }
            }
        ],
        "response_schema": {
            "type": "object",
            "properties": {
                "city": {
                    "type": "string"
                },
                "temperature": {
                    "type": "number"
                },
                "unit": {
                    "type": "string",
                    "enum": [ "celsius", "fahrenheit" ]
                },
                "condition": {
                    "type": "string"
                }
            },
            "required": [ "city", "temperature", "unit", "condition" ],
            "additionalProperties": false
        }
    }
  • $.extra_bodyobject

    Optional provider-specific request fields; supported only with AI Gateways with BYOK.

  • $.service_tierstring

    Optional provider service tier; supported only with AI Gateways with BYOK.

Post/api/v1/chat/completionsInference (chat completions)
All endpointsInference

Inference (chat completions)

Creates an OpenAI-compatible chat completion using an integrated model or an AI Gateway. Supports streaming, tool calls, multimodal messages, response schemas and usage metadata. Note: it is recommended to use the long inference endpoint at https://direct.inference.aivax.net/, because this endpoint may take a while to respond on non-streaming responses.

POST/api/v1/chat/completions

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

  • Sse-Stream-Options

    Optional. Use no-ping to disable periodic keep-alive events on streaming responses.

Request parameters:

  • $.modelstringRequired

    Integrated model name, AI Gateway identifier or AI Gateway slug.

  • $.messagesarray

    OpenAI-compatible message array. Required unless prompt is supplied.

    Examples:

    User text content

    User message with textual content

    {
        "model": "@google/gemini-3-flash",
        "messages": [
            {
                "role": "user",
                "content": [
                    {
                        "type": "text",
                        "text": "Describe these inputs briefly."
                    }
                ]
            },
            {
                "role": "user",
                "content": "Alternative, short way to input data"
            }
        ]
    }
    Assistant message

    Assistant message with textual content

    {
        "model": "@google/gemini-3-flash",
        "messages": [
            {
                "role": "assistant",
                "content": "How can I help you today?"
            }
        ]
    }
    System message

    System message with instructions for the assistant

    {
        "model": "@google/gemini-3-flash",
        "messages": [
            {
                "role": "system",
                "content": "Answer concisely and in English."
            },
            {
                "role": "user",
                "content": "What is the capital of France?"
            }
        ]
    }
    Tool call result

    Assistant tool call followed by its tool result

    {
        "model": "@google/gemini-3-flash",
        "messages": [
            {
                "role": "assistant",
                "content": null,
                "tool_calls": [
                    {
                        "id": "call_weather_123",
                        "type": "function",
                        "function": {
                            "name": "get_weather",
                            "arguments": "{\"city\":\"Lisbon\",\"unit\":\"celsius\"}"
                        }
                    }
                ]
            },
            {
                "role": "tool",
                "tool_call_id": "call_weather_123",
                "content": "{\"temperature\":21,\"unit\":\"celsius\",\"condition\":\"sunny\"}"
            }
        ]
    }
    User image content

    User message with textual and image content

    {
        "model": "@google/gemini-3-flash",
        "messages": [
            {
                "role": "user",
                "content": [
                    {
                        "type": "text",
                        "text": "What's on this image?"
                    },
                    {
                        "type": "image_url",
                        "image_url": {
                            "url": "data:image/png;base64,SGVsbG8sIHdvcmxkIQ==",
                            "detail": "auto"
                        }
                    },
                    {
                        "type": "image_url",
                        "image_url": {
                            "url": "https://example.com/image.png",
                            "detail": "high"
                        }
                    }
                ]
            }
        ]
    }
    User audio content

    User message with textual and audio content

    {
        "model": "@google/gemini-3-flash",
        "messages": [
            {
                "role": "user",
                "content": [
                    {
                        "type": "text",
                        "text": "Transcribe the following audio."
                    },
                    {
                        "type": "input_audio",
                        "input_audio": {
                            "data": "VGhpcyBpcyBhIHRlc3Qu...",
                            "format": "wav"
                        }
                    }
                ]
            }
        ]
    }
    User video content

    User message with textual and video content

    {
        "model": "@google/gemini-3-flash",
        "messages": [
            {
                "role": "user",
                "content": [
                    {
                        "type": "text",
                        "text": "What happens in the following video?"
                    },
                    {
                        "type": "video_url",
                        "video_url": {
                            "url": "UHJvZ3JhbWFjYW8gZW0gSmF2YQ=="
                        }
                    },
                    {
                        "type": "video_url",
                        "video_url": {
                            "url": "https://example.com/video.mp4"
                        }
                    }
                ]
            }
        ]
    }
    User file/PDF content

    User message with textual and file content

    {
        "model": "@google/gemini-3-flash",
        "messages": [
            {
                "role": "user",
                "content": [
                    {
                        "type": "text",
                        "text": "What's the insights of this report?"
                    },
                    {
                        "type": "file",
                        "file": {
                            "filename": "document.pdf",
                            "file_data": "data:application/pdf;base64,QmFzZTY0IGVuY29kaW5nIGV4YW1wbGU="
                        }
                    },
                    {
                        "type": "file",
                        "file": {
                            "filename": "document.pdf",
                            "file_data": "https://example.com/report.pdf"
                        }
                    }
                ]
            }
        ]
    }
  • $.promptstring | array

    Alias for $.messages. String or OpenAI-compatible message array accepted as an alternative to messages.

  • $.streamboolean

    Streams completion events as text/event-stream when true.

  • $.metadataobject

    Optional string key/value metadata stored with the conversation.

  • $.idempotency_keystring

    Optional key used to reuse the the observability conversation token. Use one id for the each conversation.

  • $.allow_loggingboolean

    Optional. When false, this request is not written to the account conversation logs. Defaults to true; account-level conversation logging still applies.

  • $.userstring

    Optional external user identifier.

  • $.temperaturenumber

    Optional sampling temperature.

  • $.top_pnumber

    Optional nucleus sampling value.

  • $.top_kinteger

    Optional top-k sampling value forwarded to compatible gateways.

  • $.seedinteger

    Optional sampling seed.

  • $.toolsarray

    Optional OpenAI-compatible tool definitions.

    Examples:

    Weather tool

    Function tool that retrieves the current weather for a city

    {
        "model": "@google/gemini-3-flash",
        "messages": [
            {
                "role": "user",
                "content": "What is the current weather in Lisbon?"
            }
        ],
        "tools": [
            {
                "type": "function",
                "function": {
                    "name": "get_weather",
                    "description": "Gets the current weather for a city.",
                    "parameters": {
                        "type": "object",
                        "properties": {
                            "city": {
                                "type": "string",
                                "description": "City name."
                            },
                            "unit": {
                                "type": "string",
                                "enum": [ "celsius", "fahrenheit" ]
                            }
                        },
                        "required": [ "city" ],
                        "additionalProperties": false
                    }
                }
            }
        ]
    }
  • $.tool_choicestring | object

    Optional tool-selection behavior forwarded to compatible gateways.

  • $.builtin_toolsobject

    Optional AIVAX built-in tool selection and options. Include DateTime in tools to expose get_date_time, which takes no arguments and returns date, time, day_of_week (English), time_zone, utc_offset and date_time (ISO 8601).

    Examples:

    Web search and image generation

    AIVAX built-in tools for searching the web and generating an image from the findings

    {
        "model": "@google/gemini-3-flash",
        "messages": [
            {
                "role": "user",
                "content": "Search the web for a recent James Webb Space Telescope discovery, summarize it, and generate an illustration inspired by the findings."
            }
        ],
        "builtin_tools": {
            "tools": [ "WebSearch", "ImageGeneration" ],
            "options": {
                "webSearchMode": "Full",
                "webSearchMaxResults": 5,
                "imageGenerationMaxResults": 1,
                "imageGenerationQuality": "High",
                "imageGenerationAllowMatureContent": false,
                "imageGenerationAllowReferenceUsage": true
            }
        }
    }
  • $.time_zonestring

    Optional IANA time zone, such as America/Sao_Paulo, used by get_date_time, scheduling tools and the Bash tool for this request only. Overrides the AI gateway time zone, which defaults to America/Sao_Paulo. Invalid identifiers are rejected.

  • $.routing_optionsobject

    Optional provider routing for integrated models. Overrides the gateway routing preference for this request only.

    Examples:

    Preferred providers with fallback

    Tries azure-us, then azure-eu, then any available provider, choosing within each step with the Balanced strategy

    {
        "model": "@openai/gpt-6-luna",
        "messages": [
            {
                "role": "user",
                "content": "Summarize this incident report."
            }
        ],
        "routing_options": {
            "preset": "Balanced",
            "allowed_providers": [ "azure/us", "azure/eu", "*" ]
        }
    }
  • $.routing_options.presetstring

    Provider routing strategy: Balanced, Cheapest, Fastest or Quality. Defaults to the gateway routing preference.

  • $.routing_options.allowed_providersarray

    Ordered provider tags tried in sequence, such as azure-us. Use "" to match any provider, usually as the last item. Defaults to [""]; an empty array is rejected. The request fails when none of the listed providers is available.

  • $.routing_presetstring

    Deprecated. Use routing_options.preset instead. When both are sent, routing_options.preset takes precedence.

  • $.reasoning_effortstring

    Optional reasoning effort selector.

  • $.verbositystring

    Optional response verbosity selector.

  • $.max_completion_tokensinteger

    Optional maximum completion tokens.

  • $.max_tokensinteger

    Compatibility alias for max_completion_tokens.

  • $.stopstring | array

    Optional stop sequence or sequences.

  • $.response_formatobject

    Optional OpenAI-compatible structured-output format.

  • $.response_schemaobject

    Optional shorthand JSON schema for structured output.

    Examples:

    JSON healing after a tool call

    Tool result followed by a schema-constrained final response with automatic JSON healing

    {
        "model": "@google/gemini-3-flash",
        "messages": [
            {
                "role": "user",
                "content": "What is the current weather in Lisbon?"
            }
        ],
        "tools": [
            {
                "type": "function",
                "function": {
                    "name": "get_weather",
                    "description": "Gets the current weather for a city.",
                    "parameters": {
                        "type": "object",
                        "properties": {
                            "city": {
                                "type": "string"
                            },
                            "unit": {
                                "type": "string",
                                "enum": [ "celsius", "fahrenheit" ]
                            }
                        },
                        "required": [ "city" ],
                        "additionalProperties": false
                    }
                }
            }
        ],
        "response_schema": {
            "type": "object",
            "properties": {
                "city": {
                    "type": "string"
                },
                "temperature": {
                    "type": "number"
                },
                "unit": {
                    "type": "string",
                    "enum": [ "celsius", "fahrenheit" ]
                },
                "condition": {
                    "type": "string"
                }
            },
            "required": [ "city", "temperature", "unit", "condition" ],
            "additionalProperties": false
        }
    }
  • $.extra_bodyobject

    Optional provider-specific request fields; supported only with AI Gateways with BYOK.

  • $.service_tierstring

    Optional provider service tier; supported only with AI Gateways with BYOK.

Documents

Get/api/v1/collections/<collection-id>/documentsBrowse Documents
All endpointsDocuments

Browse Documents

Lists up to 200 documents from a collection without a text filter, or up to 300 documents when a text filter is provided.

GET/api/v1/collections/<collection-id>/documents

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Path parameters:

  • collection-iduuid

    Identifier of the collection that contains the documents.

Query parameters:

  • filterstring

    Plain text search across name, reference, contents and tags, or command syntax such as -t tag -n name -r reference -c content -i id.

  • order_bystring

    Sort order: created_at_asce, created_at_desc, updated_at_asce, updated_at_desc, indexed_at_asce or indexed_at_desc.

  • statestring

    Indexing state filter. Accepted values: queued or indexed.

Post/api/v1/collections/<collection-id>/documentsIndex Documents (JSONL)
All endpointsDocuments

Index Documents (JSONL)

Deprecated: use Index Documents (JSONL WebSocket) for new integrations. Uploads documents from a JSONL file. Existing documents are matched by docId: changed text queues reindexing; changed text with non-null __meta also updates metadata; changed text with null or omitted __meta keeps current metadata; changed __meta alone updates metadata without reindexing; new docIds are created. When insert-mode is sync, documents missing from the uploaded JSONL are deleted.

POST/api/v1/collections/<collection-id>/documents

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Path parameters:

  • collection-iduuid

    Identifier of the collection that will receive the documents.

Request parameters:

  • documentsfile

    JSONL file containing one document object per line.

    Examples:

    JSONL document file

    File contents with one document JSON object per line.

    {"docId":"getting-started","text":"Open the dashboard and create your first collection.","__ref":"https://example.com/docs/getting-started","__tags":["guide","onboarding"],"__meta":{"language":"en"}}
    {"docId":"pricing","text":"Plans are billed monthly and can be changed at any time.","__tags":["billing"]}
  • insert-modestring

    Set to sync to delete collection documents whose names are not present in the uploaded JSONL file.

Put/api/v1/collections/<collection-id>/documentsCreate or Update Document
All endpointsDocuments

Create or Update Document

Creates or updates a single document matched by name. name is required to identify the document. Existing documents may be updated with a partial payload: omitted contents, reference, tags and metadata keep their current values. Changed contents queue reindexing; metadata objects are shallow-merged with current metadata without reindexing when contents are unchanged; null or omitted metadata keeps current metadata. Missing documents are created and require contents.

PUT/api/v1/collections/<collection-id>/documents

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Path parameters:

  • collection-iduuid

    Identifier of the collection that contains or will receive the document.

Get/api/v2/collections/<collection-id>/documents/index-jsonlIndex Documents (JSONL WebSocket)
All endpointsDocuments

Index Documents (JSONL WebSocket)

Imports documents by streaming JSONL lines over a WebSocket. Successor of Index Documents (JSONL), accepting 10× the plan's per-request JSONL line limit. Send UTF-8 text messages containing one or more complete JSONL lines separated by \n; fragmented messages are accepted. Each line must contain docId and text, and may contain __ref, __tags and __meta, with the same create, update and reindexing rules as Index Documents (JSONL). Blank lines are ignored. Every 100 lines are validated against the account balance, storage quota and collection access, committed and queued for indexing; the server then sends a progress message. Send a line containing only END to commit the remaining lines and finish the import. Each message must arrive within 30 seconds of the previous one. If the connection closes, times out or fails before END, uncommitted lines are discarded and already committed blocks remain queued; resend the lines after the reported committed count. Only one import per collection runs at a time; a new connection waits up to 30 seconds for the running import and fails with 409 Conflict otherwise. Server messages are JSON objects: progress { type, committed, updated, skipped }, completed { type, received, updated, skipped, removed } and error { type, message, line, committed }. Line numbers count non-empty lines. Browsers can authenticate with the api-key query parameter.

GET/api/v2/collections/<collection-id>/documents/index-jsonl

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Path parameters:

  • collection-iduuid

    Identifier of the collection that will receive the documents.

Query parameters:

  • insert-modestring

    Set to sync to delete collection documents whose names are not present in the streamed lines after END is received.

Post/api/v1/collections/<collection-id>/documents/media/chunkUpload Media Document Chunk
All endpointsDocuments

Upload Media Document Chunk

Appends a binary media file chunk to an in-progress document import.

POST/api/v1/collections/<collection-id>/documents/media/chunk

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

  • X-Import-Media-File-NameRequired

    Original media file name. Required for the import.

  • X-Import-Media-File-Name-Encoding

    Set to percent when X-Import-Media-File-Name is percent-encoded.

  • X-Import-Media-Upload-IdRequired

    UUID that identifies this upload and must also be sent when completing it.

Path parameters:

  • collection-iduuid

    Identifier of the collection that will receive the imported document.

Get/api/v1/collections/<collection-id>/documents/<document-id>Get Document
All endpointsDocuments

Get Document

Returns the full stored document, including contents, metadata, tags, timestamps and indexing state.

GET/api/v1/collections/<collection-id>/documents/<document-id>

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Path parameters:

  • collection-iduuid

    Identifier of the collection that contains the document.

  • document-iduuid

    Identifier of the document to retrieve.

Delete/api/v1/collections/<collection-id>/documents/<document-id>Delete Document
All endpointsDocuments

Delete Document

Deletes one document from a collection. When include-references is present, deletes documents in the same collection that share the selected document's reference.

DELETE/api/v1/collections/<collection-id>/documents/<document-id>

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Path parameters:

  • collection-iduuid

    Identifier of the collection that contains the document.

  • document-iduuid

    Identifier of the document to delete.

Post/api/v1/collections/<collection-id>/documents/media/completeComplete Media Document Import
All endpointsDocuments

Complete Media Document Import

Queues processing of the binary media upload previously sent in chunks.

POST/api/v1/collections/<collection-id>/documents/media/complete

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

  • X-Import-Media-File-NameRequired

    Original media file name used for the completed import.

  • X-Import-Media-File-Name-Encoding

    Set to percent when X-Import-Media-File-Name is percent-encoded.

  • X-Import-Media-Upload-IdRequired

    UUID that identifies the chunks to process.

Path parameters:

  • collection-iduuid

    Identifier of the collection that will receive the imported document.

Request parameters:

  • $.contextstring

    Optional context used while processing the imported media.

Web

Post/api/v1/web/fetchFetch web contents

Fetch web contents

Extracts readable text from URLs or base64 data URIs, with optional schema-guided JSON conversion. Each item is limited to 10 MB. JSON conversion is billed separately from text/OCR extraction and is not covered by its daily allowance.

POST/api/v1/web/fetch

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Request parameters:

  • $.contentsarrayRequired

    Non-empty URL or base64 data URI values to extract.

    Examples:

    Web pages

    Extracts readable content from public web pages.

    {
        "contents": [
            "https://example.com/article",
            "https://example.org/documentation"
        ],
        "returnErrors": true
    }
    Inline files (data url)

    Extracts an inline file supplied as a base64 data URI with its MIME type. This example encodes a plain-text file containing Hello world.

    {
        "contents": [
            "data:text/plain;base64,SGVsbG8gd29ybGQ="
        ],
        "returnErrors": true
    }
    External files

    Extracts content from direct public file URLs. Replace the example URLs with accessible files in supported formats.

    {
        "contents": [
            "https://example.com/files/manual.pdf",
            "https://example.com/files/receipt.png",
            "https://example.com/files/report.docx"
        ],
        "returnErrors": true
    }
  • $.returnErrorsboolean

    Defaults to true: returns an error item for each failed extraction or JSON conversion. When false, failed items are omitted.

  • $.responseSchemaobject

    Optional JSON Schema applied to each item's extracted text to generate extractedObject. Omit or set to null for text-only extraction. JSON conversion usage is reported separately in jsonProcessingUnits.

    Examples:

    Structured JSON extraction

    Extracts receipt fields into JSON while retaining the source text. JSON conversion has a separate inference-based PU charge.

    {
        "contents": [
            "https://example.com/files/receipt.png"
        ],
        "returnErrors": true,
        "responseSchema": {
            "type": "object",
            "instructions": "Extract only information present in the receipt. Use null for missing values.",
            "properties": {
                "merchant": {
                    "type": ["string", "null"],
                    "description": "Merchant name printed on the receipt."
                },
                "date": {
                    "type": ["string", "null"],
                    "description": "Receipt date in YYYY-MM-DD format, if available."
                },
                "total": {
                    "type": ["number", "null"],
                    "description": "Final total printed on the receipt."
                }
            },
            "required": ["merchant", "date", "total"],
            "additionalProperties": false
        }
    }
  • $.responseSchema.instructionsstring

    Optional extraction guidance inside responseSchema. This AIVAX extension is not a standard JSON Schema keyword.

Post/api/v1/web/searchSearch the web

Search the web

Searches the web with optional country, language and domain filters.

POST/api/v1/web/search

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Request parameters:

  • $.querystringRequired

    Search query.

  • $.topninteger

    Optional result count from 1 to 25.

  • $.countrystring

    Optional two-letter ISO 3166-1 country code.

  • $.languagestring

    Optional language code.

  • $.includeDomainsarray

    Optional domain allowlist.

    Examples:

    Domain allowlist

    Restricts results to the supplied domains.

    {
        "query": "latest artificial intelligence research",
        "topn": 5,
        "country": "US",
        "language": "en",
        "includeDomains": [
            "arxiv.org",
            "nature.com"
        ]
    }

Hook Schedules

Get/api/v1/web-chat-clients/<web-chat-id>/hook-schedulesList Hook Schedules
All endpointsHook Schedules

List Hook Schedules

Lists one-time hook schedules, recurring hook tasks and recently inactive users for a web chat client.

GET/api/v1/web-chat-clients/<web-chat-id>/hook-schedules

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Path parameters:

  • web-chat-iduuid

    Identifier of the web chat client.

Query parameters:

  • external-user-idstring

    Optional external user id used to restrict schedules and recurring tasks.

Get/api/v1/web-chat-clients/<web-chat-id>/hook-schedules/schedules/<id>Get Schedule
All endpointsHook Schedules

Get Schedule

Returns one pending, activated or failed one-time hook activation schedule for a web chat client.

GET/api/v1/web-chat-clients/<web-chat-id>/hook-schedules/schedules/<id>

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Path parameters:

  • web-chat-iduuid

    Identifier of the web chat client.

  • iduuid

    Identifier of the one-time schedule.

Delete/api/v1/web-chat-clients/<web-chat-id>/hook-schedules/schedules/<id>Cancel Schedule
All endpointsHook Schedules

Cancel Schedule

Deletes one hook activation schedule from a web chat client.

DELETE/api/v1/web-chat-clients/<web-chat-id>/hook-schedules/schedules/<id>

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Path parameters:

  • web-chat-iduuid

    Identifier of the web chat client.

  • iduuid

    Identifier of the schedule to delete.

Get/api/v1/web-chat-clients/<web-chat-id>/hook-schedules/recurring/<id>Get Recurring Task
All endpointsHook Schedules

Get Recurring Task

Returns one recurring hook activation task, including cron expression, activation counts and next activation time.

GET/api/v1/web-chat-clients/<web-chat-id>/hook-schedules/recurring/<id>

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Path parameters:

  • web-chat-iduuid

    Identifier of the web chat client.

  • iduuid

    Identifier of the recurring task.

Delete/api/v1/web-chat-clients/<web-chat-id>/hook-schedules/recurring/<id>Cancel Recurring Task
All endpointsHook Schedules

Cancel Recurring Task

Deletes one recurring hook activation task from a web chat client.

DELETE/api/v1/web-chat-clients/<web-chat-id>/hook-schedules/recurring/<id>

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Path parameters:

  • web-chat-iduuid

    Identifier of the web chat client.

  • iduuid

    Identifier of the recurring task to delete.

Web Chat

Get/api/v1/web-chat-clientList Web Chat Clients

List Web Chat Clients

Lists web chat clients owned by the authenticated account with active session counts and linked gateway summaries.

GET/api/v1/web-chat-client

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Post/api/v1/web-chat-clientCreate Web Chat Client

Create Web Chat Client

Creates a web chat client linked to an AI Gateway for browser chat sessions and optional messaging integrations.

POST/api/v1/web-chat-client

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Get/api/v1/web-chat-client/<id>View Web Chat Client

View Web Chat Client

Returns the web chat client's gateway link, rate limits, UI/client parameters and messaging integration settings.

GET/api/v1/web-chat-client/<id>

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Path parameters:

  • iduuid

    Identifier of the web chat client to retrieve.

Put/api/v1/web-chat-client/<id>Edit Web Chat Client

Edit Web Chat Client

Updates an existing web chat client. The request may contain only the fields to change; omitted fields keep their current values. clientParameters and limitingParameters are shallow-merged with the existing objects, replacing only supplied top-level keys.

PUT/api/v1/web-chat-client/<id>

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Path parameters:

  • iduuid

    Identifier of the web chat client to update.

Delete/api/v1/web-chat-client/<id>Delete Web Chat Client

Delete Web Chat Client

Deletes a web chat client owned by the authenticated account.

DELETE/api/v1/web-chat-client/<id>

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Path parameters:

  • iduuid

    Identifier of the web chat client to delete.

Put/api/v1/web-chat-client/<id>/integrationsEdit Web Chat Client Integrations

Edit Web Chat Client Integrations

Updates integrations for a web chat client. integrationType is required. The selected integration payload may be partial; it is shallow-merged with the existing integration parameters and only supplied top-level keys are replaced.

PUT/api/v1/web-chat-client/<id>/integrations

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Path parameters:

  • iduuid

    Identifier of the web chat client whose integration will be updated.

Delete/api/v1/web-chat-client/<id>/integrations/<name>Delete Web Chat Client Integration

Delete Web Chat Client Integration

Removes one messaging integration configuration from a web chat client.

DELETE/api/v1/web-chat-client/<id>/integrations/<name>

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Path parameters:

  • iduuid

    Identifier of the web chat client.

  • namestring

    Integration name to remove: Zapi, Telegram, EvolutionApi or Kapso.

Web Chat Sessions

Post/api/v1/web-chat-client/<chat-client-id>/sessionsCreate Web Chat Session
All endpointsWeb Chat Sessions

Create Web Chat Session

Creates a web chat session for a client, or refreshes the existing session when the same tag already exists.

POST/api/v1/web-chat-client/<chat-client-id>/sessions

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Path parameters:

  • chat-client-iduuid

    Identifier of the web chat client that owns the session.

Get/api/v1/web-chat-client/<chat-client-id>/sessionsList Web Chat Sessions
All endpointsWeb Chat Sessions

List Web Chat Sessions

Lists up to 300 sessions for a web chat client, including context preview, tag, timestamps, message count and token count.

GET/api/v1/web-chat-client/<chat-client-id>/sessions

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Path parameters:

  • chat-client-iduuid

    Identifier of the web chat client whose sessions will be listed.

Query parameters:

  • filterstring

    Optional search over access key, extra context, external user id or exact session id.

Delete/api/v1/web-chat-client/<chat-client-id>/sessions/<session-id>Delete Web Chat Session
All endpointsWeb Chat Sessions

Delete Web Chat Session

Deletes a web chat session from a client, ending access through its session key.

DELETE/api/v1/web-chat-client/<chat-client-id>/sessions/<session-id>

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Path parameters:

  • chat-client-iduuid

    Identifier of the web chat client that owns the session.

  • session-iduuid

    Identifier of the session to delete.

Voice Sessions

Get/api/v1/voice-sessionOpen realtime voice session
All endpointsVoice Sessions

Open realtime voice session

Opens an authenticated WebSocket connection using the OpenAI-compatible Realtime event protocol. The first client message must be a session.update event. The event can include gateway and model selectors at the event level or inside session. Standard realtime session fields such as audio.output.voice, reasoning.effort, instructions and tools are supported.

GET/api/v1/voice-session

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Subscriptions

Get/api/v1/subscriptionsGet Subscription
All endpointsSubscriptions

Get Subscription

Gets the current plan, whether the current cycle is paid, the pending modification, the next renewal date and the price of each purchasable plan for the authenticated account.

GET/api/v1/subscriptions

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Post/api/v1/subscriptions/planChange Plan
All endpointsSubscriptions

Change Plan

Subscribes to or changes the account plan. Upgrades are charged now with a pro-rata discount and applied as soon as the payment is confirmed; downgrades take effect at the next renewal.

POST/api/v1/subscriptions/plan

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Post/api/v1/subscriptions/cancelCancel Subscription
All endpointsSubscriptions

Cancel Subscription

Schedules the subscription cancellation. The current plan stays active until the end of the paid cycle, then the account returns to Free.

POST/api/v1/subscriptions/cancel

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Post/api/v1/subscriptions/resubscribeResubscribe
All endpointsSubscriptions

Resubscribe

Removes a pending cancellation or downgrade so the current plan renews normally.

POST/api/v1/subscriptions/resubscribe

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Get/api/v1/subscriptions/payment-methodsList Payment Methods
All endpointsSubscriptions

List Payment Methods

Lists the cards saved for automatic subscription renewals.

GET/api/v1/subscriptions/payment-methods

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Post/api/v1/subscriptions/payment-methods/portalPayment Methods Portal
All endpointsSubscriptions

Payment Methods Portal

Creates a short-lived URL to the hosted panel where saved cards are added, removed or set as default.

POST/api/v1/subscriptions/payment-methods/portal

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Skills

Get/api/v1/skillsList Skills

List Skills

Lists skills owned by the authenticated account with slug, description and allowed-tool count.

GET/api/v1/skills

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Query parameters:

  • filterstring

    Optional search over skill id, slug or description.

Post/api/v1/skillsCreate Skill

Create Skill

Creates a reusable instruction package that can be enabled on AI Gateways and can limit which tools are visible.

POST/api/v1/skills

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Get/api/v1/skills/<skill-id>Get Skill

Get Skill

Returns a skill's slug, instructions, description and tool/instruction-source options.

GET/api/v1/skills/<skill-id>

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Path parameters:

  • skill-iduuid

    Identifier of the skill to retrieve.

Put/api/v1/skills/<skill-id>Update Skill

Update Skill

Updates an existing skill. The request may contain only the fields to change; omitted fields keep their current values. options is shallow-merged with the existing options object, replacing only supplied top-level keys.

PUT/api/v1/skills/<skill-id>

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Path parameters:

  • skill-iduuid

    Identifier of the skill to update.

Delete/api/v1/skills/<skill-id>Delete Skill

Delete Skill

Deletes a skill owned by the authenticated account.

DELETE/api/v1/skills/<skill-id>

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Path parameters:

  • skill-iduuid

    Identifier of the skill to delete.

Delete/api/v1/skills/management/clearClear Skills

Clear Skills

Deletes every skill owned by the authenticated account.

DELETE/api/v1/skills/management/clear

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Post/api/v1/skills/management/importImport Skills (JSONL)

Import Skills (JSONL)

Uploads and imports skills from a JSONL file. Each line must be a JSON object with 'slug' and 'instructions' at minimum. See the example for the full schema.

POST/api/v1/skills/management/import

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Request parameters:

  • skillsfile

    JSONL file containing one skill object per line.

Get/api/v1/skills/management/export.jsonlExport Skills (JSONL)

Export Skills (JSONL)

Exports all skills for the authenticated account in JSONL format. Each line is a JSON object with 'slug', 'description', 'instructions', and 'options'.

GET/api/v1/skills/management/export.jsonl

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Shell I/O

Get/api/v1/shell/io/fileDownload File
All endpointsShell I/O

Download File

Downloads one file from the account and X-Shell-User-Id scoped shell sandbox.

GET/api/v1/shell/io/file

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

  • X-Shell-User-IdRequired

    Application user identifier used to isolate this shell filesystem within the authenticated account.

Query parameters:

  • pathstringRequired

    File path inside the shell sandbox.

Post/api/v1/shell/io/fileUpload File
All endpointsShell I/O

Upload File

Writes the request body to a file inside the shell sandbox, creating or replacing the file. Maximum request size is 100 MB.

POST/api/v1/shell/io/file

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

  • X-Shell-User-IdRequired

    Application user identifier used to isolate this shell filesystem within the authenticated account.

Query parameters:

  • pathstringRequired

    Destination file path inside the shell sandbox.

Delete/api/v1/shell/io/fileDelete File
All endpointsShell I/O

Delete File

Deletes one file from the shell sandbox.

DELETE/api/v1/shell/io/file

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

  • X-Shell-User-IdRequired

    Application user identifier used to isolate this shell filesystem within the authenticated account.

Query parameters:

  • pathstringRequired

    File path inside the shell sandbox.

Get/api/v1/shell/io/listingList Directory
All endpointsShell I/O

List Directory

Lists files and directories inside a shell sandbox scoped by account and X-Shell-User-Id.

GET/api/v1/shell/io/listing

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

  • X-Shell-User-IdRequired

    Application user identifier used to isolate this shell filesystem within the authenticated account.

Query parameters:

  • pathstringRequired

    Directory path inside the shell sandbox.

Post/api/v1/shell/io/directoryCreate Directory
All endpointsShell I/O

Create Directory

Creates a directory path inside the shell sandbox.

POST/api/v1/shell/io/directory

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

  • X-Shell-User-IdRequired

    Application user identifier used to isolate this shell filesystem within the authenticated account.

Query parameters:

  • pathstringRequired

    Directory path to create inside the shell sandbox.

Delete/api/v1/shell/io/directoryDelete Directory
All endpointsShell I/O

Delete Directory

Recursively deletes a non-root directory from the shell sandbox.

DELETE/api/v1/shell/io/directory

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

  • X-Shell-User-IdRequired

    Application user identifier used to isolate this shell filesystem within the authenticated account.

Query parameters:

  • pathstringRequired

    Directory path inside the shell sandbox. Root paths are rejected.

Get/api/v1/shell/io/file/detailsGet File Details
All endpointsShell I/O

Get File Details

Returns size, timestamps, MIME type and text-detection metadata for one file in the shell sandbox.

GET/api/v1/shell/io/file/details

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

  • X-Shell-User-IdRequired

    Application user identifier used to isolate this shell filesystem within the authenticated account.

Query parameters:

  • pathstringRequired

    File path inside the shell sandbox.

Get/api/v1/shell/io/file/public-addressGet File Public Address
All endpointsShell I/O

Get File Public Address

Creates a temporary public download URL for one file in the shell sandbox.

GET/api/v1/shell/io/file/public-address

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

  • X-Shell-User-IdRequired

    Application user identifier used to isolate this shell filesystem within the authenticated account.

Query parameters:

  • pathstringRequired

    File path inside the shell sandbox.

RAG

Post/api/v1/querySemantic search

Semantic search

Searches one or more RAG collections with semantic similarity and returns matching documents, scores, metadata and optional referenced documents.

POST/api/v1/query

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Request parameters:

  • $.collectionsarrayRequired

    Collection UUIDs to search.

  • $.termsstring | array

    Search string or strings. Optional when a filter is supplied: without terms, only filtered documents are returned, newest first, without embedding or reranking.

  • $.termstring | array

    Compatibility alias for terms.

  • $.promptstring | array

    Compatibility alias for terms.

  • $.topinteger

    Optional maximum number of results.

  • $.minScorenumber

    Optional minimum similarity score.

  • $.rerankerstring

    Optional reranker identifier.

  • $.filterstring | array

    Optional document filter evaluated before the search. Example: 'tags has "finance" and metadata.year >= 2025 and createdAt >= now-30d'. An array of filters is combined with and. Syntax and examples: https://docs.aivax.net/docs/filters/document-filters

  • $.includeReferencesboolean

    Includes referenced document chunks when true.

Post/api/v1/answerAnswer generation

Answer generation

Searches one or more RAG collections, then asks a model to answer using the retrieved documents and returns both the answer and source results.

POST/api/v1/answer

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Request parameters:

  • $.collectionsarrayRequired

    Collection UUIDs to search.

  • $.termsstring | array

    Search string or strings. Optional when a filter is supplied: without terms, only filtered documents are returned, newest first, without embedding or reranking.

  • $.termstring | array

    Compatibility alias for terms.

  • $.promptstring | array

    Compatibility alias for terms.

  • $.topinteger

    Optional maximum number of results.

  • $.minScorenumber

    Optional minimum similarity score.

  • $.rerankerstring

    Optional reranker identifier.

  • $.filterstring | array

    Optional document filter evaluated before the search. Example: 'tags has "finance" and metadata.year >= 2025 and createdAt >= now-30d'. An array of filters is combined with and. Syntax and examples: https://docs.aivax.net/docs/filters/document-filters

  • $.includeReferencesboolean

    Includes referenced document chunks when true.

Post/api/v1/generations/rerankRerank documents

Rerank documents

Ranks supplied document strings with the selected reranker.

POST/api/v1/generations/rerank

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Request parameters:

  • $.documentsarrayRequired

    Non-empty document strings to rank.

  • $.querystringRequired

    Query used to rank the documents.

  • $.modelstring

    Optional reranker identifier.

  • $.top_ninteger

    Optional maximum number of ranked documents to return.

  • $.min_scorenumber

    Optional minimum relevance score.

Post/api/v1/generations/segmentSegment text

Segment text

Splits supplied document strings into semantically cohesive segments for embedding and RAG ingestion. Without sanitization, segments target about 300 tokens, cover the whole document in source order without overlap, and their boundaries are chosen from the document structure and the semantic similarity of neighboring passages. Documents up to that size are returned as a single segment.

POST/api/v1/generations/segment

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Request parameters:

  • $.documentsarrayRequired

    Non-empty document strings to segment.

  • $.sanitizeboolean

    Optional text sanitization flag. Skip possible segments or documents that are better left out of the RAG. Sanitized requests are processed by a language model and are slower.

Post/api/v1/generations/reflex/rerankRerank documents

Rerank documents

Ranks supplied document strings with the selected reranker.

POST/api/v1/generations/reflex/rerank

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Request parameters:

  • $.documentsarrayRequired

    Non-empty document strings to rank.

  • $.querystringRequired

    Query used to rank the documents.

  • $.modelstring

    Optional reranker identifier.

  • $.top_ninteger

    Optional maximum number of ranked documents to return.

  • $.min_scorenumber

    Optional minimum relevance score.

Web Chat Client

Get/api/v1/public/chat-clients/<access-key>Get Session Info
All endpointsWeb Chat Client

Get Session Info

Retrieves information about the current session, including messages, client configuration, and culture settings.

GET/api/v1/public/chat-clients/<access-key>
Post/api/v1/public/chat-clients/<access-key>/retryRetry Last Message
All endpointsWeb Chat Client

Retry Last Message

Removes all messages after the last user message, allowing the user to retry the conversation from that point.

POST/api/v1/public/chat-clients/<access-key>/retry
Post/api/v1/public/chat-clients/<access-key>/promptSend Prompt
All endpointsWeb Chat Client

Send Prompt

Sends a prompt to the AI gateway and returns the completion result synchronously.

POST/api/v1/public/chat-clients/<access-key>/prompt

Path parameters:

  • access-keystring

    Access key of the public chat-client session.

Request parameters:

  • $.promptstring | object | arrayRequired

    Text (converted to a user message), one OpenAI-compatible message, or an ordered array of messages. At least one message must contain content or tool calls. Messages are added after the existing session history for inference.

    Examples:

    Multimodal prompt

    User prompt containing text and an image URL.

    {
        "prompt": {
            "role": "user",
            "content": [
                {
                    "type": "text",
                    "text": "Describe this image."
                },
                {
                    "type": "image_url",
                    "image_url": {
                        "url": "https://example.com/image.png",
                        "detail": "auto"
                    }
                }
            ]
        }
    }
  • $.prompt.rolestring

    For message objects, use user for user input, assistant for tool-call messages, or tool for tool results. Also applies to each message in an array.

  • $.prompt.contentstring | array

    Message text or OpenAI-compatible multimodal content parts. For tool results, provide the result as text. Also applies to each message in an array.

  • $.prompt.tool_callsarray

    OpenAI-compatible tool calls on an assistant message, with id, type=function and function containing name and JSON-encoded arguments.

  • $.prompt.tool_call_idstring

    For a tool result, the matching assistant tool-call identifier. Also applies to each message in an array.

  • $.prompt.namestring

    Function name for a tool result. Also applies to each message in an array.

  • $.commitboolean

    Defaults to true. Saves submitted and generated messages to the session. Set false to run against the existing history without saving this turn. Inference usage and tool side effects still occur; this is not a dry run.

  • $.instructionsstring | array

    Additional context for this inference only, appended after the session context and fetched external context. An array of strings is joined with blank lines. Does not replace or persist as the session extraContext.

Get/api/v1/public/chat-clients/<access-key>/transcript.jsonDownload Session Transcript
All endpointsWeb Chat Client

Download Session Transcript

Downloads the session messages, context, and metadata as a JSON file.

GET/api/v1/public/chat-clients/<access-key>/transcript.json

Platform

Get/api/v1/platform/searchSearch Platform

Search Platform

Lists account-owned RAG collections, AI Gateways, chat clients, batch workflows and jobs, plus integrated models for client-side search.

GET/api/v1/platform/search

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Notifications

Get/api/v1/notificationsList Notifications
All endpointsNotifications

List Notifications

Lists notifications for the authenticated account from newest to oldest.

GET/api/v1/notifications

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Get/api/v1/notifications/unread/countCount Unread Notifications
All endpointsNotifications

Count Unread Notifications

Counts notifications that have not been read by the authenticated account.

GET/api/v1/notifications/unread/count

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Information

Get/api/v1/information/balanceGet Account Balance
All endpointsInformation

Get Account Balance

Returns billing and quota status for the authenticated account, including balance, last-24-hour usage, plan, storage usage, subscription usage and plan limits.

GET/api/v1/information/balance

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Get/api/v1/information/speech-models.jsonGet Speech Models
All endpointsInformation

Get Speech Models

Returns the text-to-speech models available through the speech generation endpoint, including effective character-based pricing.

GET/api/v1/information/speech-models.json
Get/api/v1/information/usage/monthly-reportGet Monthly Usage Report
All endpointsInformation

Get Monthly Usage Report

Returns monthly usage insights and top-cost model, resource and SKU tables for the authenticated account.

GET/api/v1/information/usage/monthly-report

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Query parameters:

  • monthstring

    Reporting month in YYYY-MM format.

Get/api/v1/information/rerankers-models.jsonGet Reranker Models
All endpointsInformation

Get Reranker Models

Returns the current reranker catalog, pricing descriptions, autonomous-use capability, technical limits, and default selection.

GET/api/v1/information/rerankers-models.json
Get/api/v1/information/decisions-models.jsonGet Semantic Decision Models
All endpointsInformation

Get Semantic Decision Models

Returns canonical model names, accepted aliases, context lengths, release dates, descriptions, documentation links, readable pricing, supported question types, and base USD prices per million tokens. No authentication is required. Account and plan pricing adjustments are not included.

GET/api/v1/information/decisions-models.json
Get/api/v1/information/audio-transcription-models.jsonGet Audio Transcription Models
All endpointsInformation

Get Audio Transcription Models

Returns the speech-to-text models available through the audio transcription endpoint, including published duration-based pricing.

GET/api/v1/information/audio-transcription-models.json

Agentic Tests

Get/api/v1/agentic-testsList Agentic Tests
All endpointsAgentic Tests

List Agentic Tests

Lists persisted Agentic Tests owned by the authenticated account, optionally filtered by name and gateway. Each entry includes its schedule and latest run summary with execution state and judge outcome.

GET/api/v1/agentic-tests

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Query parameters:

  • searchstring

    Optional case-insensitive test-name search.

  • gatewaystring

    Optional exact gateway identifier, slug, or integrated model name.

Post/api/v1/agentic-testsCreate Agentic Test
All endpointsAgentic Tests

Create Agentic Test

Creates a reusable Agentic Test definition for a gateway or integrated model. A configured cron expression must use standard five-field syntax and cannot run more often than every five minutes.

POST/api/v1/agentic-tests

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Request parameters:

  • $.namestringRequired

    Human-readable test name. Maximum length: 200 characters.

  • $.gatewaystringRequired

    AI Gateway slug, gateway identifier, or integrated model name to test. Maximum length: 200 characters.

  • $.goalstring | object | arrayRequired

    Goal pursued by the simulated user and evaluated by the judge. Accepts text, one multimodal message part, or an array of message parts.

  • $.validation_criteriastring | object | array | null

    Additional success criteria visible only to the judge. Accepts text, one multimodal message part, or an array of message parts. Defaults to null.

  • $.startarray

    Initial OpenAI-compatible conversation messages supplied before simulation begins. Defaults to an empty array.

  • $.max_turnsinteger

    Maximum simulated user turns, from 2 to 64. Defaults to 10.

  • $.minimum_turnsinteger

    First turn on which the simulated user may end the conversation, from 1 to max_turns - 1. Defaults to 1.

  • $.allow_user_exitboolean

    Whether the simulated user may end the conversation after minimum_turns. Defaults to true.

  • $.judge_start_turninteger

    First turn evaluated by the judge, from 1 to max_turns - 1. Defaults to 1.

  • $.loss_thresholdnumber

    Score below which consecutive judge evaluations contribute to failure, from 0.01 to 0.99. Must be more than 0.1 below base_threshold. Defaults to 0.2.

  • $.base_thresholdnumber

    Score at or above which the goal is achieved, from 0.01 to 0.99. Must be more than 0.1 above loss_threshold. Defaults to 0.9.

  • $.profilestring

    Simulator and judge model profile: low, medium, or high. Defaults to medium.

  • $.user_samplingobject

    Optional simulated-user sampling configuration.

  • $.user_sampling.top_knumber

    Maximum option-selection range used by the simulated-user sampler, from 0 to 2. Defaults to 0.4.

  • $.user_sampling.max_decaynumber

    Maximum probability decay used by the simulated-user sampler, from 0 to 1. Defaults to 0.02.

  • $.metadataobject

    String key/value metadata forwarded to gateway inference. Defaults to an empty object.

  • $.resourcesarray

    External context resources. Accepts at most 16 items and defaults to an empty array.

    Examples:

    Inline context for internal evaluation

    Resolves inline text once at run startup and exposes it only to the simulated user and judge.

    [
        {
            "type": "Text",
            "hook": "OnStart",
            "visibility": "Internal",
            "cacheDuration": 900,
            "data": "The customer has a 14-day refund window."
        }
    ]
    Fresh remote context for the gateway

    Fetches the URL before every turn, bypasses cache, and exposes the result only to the tested gateway.

    [
        {
            "type": "RemoteResource",
            "hook": "OnTurn",
            "visibility": "Gateway",
            "cacheDuration": 0,
            "data": "https://example.com/current-inventory"
        }
    ]
    Shared cached remote context

    Fetches the URL at run startup and exposes the result to the simulated user, judge, and tested gateway. The remote response may be reused for up to six hours.

    [
        {
            "type": "RemoteResource",
            "hook": "OnStart",
            "visibility": "Both",
            "cacheDuration": 21600,
            "data": "https://example.com/refund-policy"
        }
    ]
  • $.resources[].typestring

    Resource source: Text for inline content or RemoteResource for an HTTP or HTTPS URL. Defaults to Text.

  • $.resources[].hookstring

    Resolution lifecycle: OnStart resolves once when the run starts; OnTurn resolves once before each turn. Defaults to OnStart.

  • $.resources[].visibilitystring

    Recipients: Internal exposes the resource only to the simulated user and judge; Gateway exposes it only to the tested gateway; Both exposes it to all three. Defaults to Internal.

  • $.resources[].cacheDurationinteger

    Remote-resource cache duration in seconds, from 0 to 21600. Zero disables caching between resolutions. Defaults to 900.

  • $.resources[].datastring

    Required non-empty inline text or remote HTTP/HTTPS URL, according to type.

  • $.external_user_idstring | null

    Optional external user identifier forwarded to gateway usage and conversation attribution. Maximum length: 200 characters. Defaults to null.

  • $.hooksarray

    Validation callbacks for persisted runs. Accepts at most 16 items and defaults to an empty array.

  • $.hooks[].eventstring

    Required callback event: before-test, after-test, before-inference, after-inference, or context-changed. before-inference and after-inference require an AI Gateway rather than an integrated model.

  • $.hooks[].urlstring

    Required public HTTP or HTTPS callback URL. Local and private addresses are rejected. Maximum length: 2048 characters.

  • $.cronstring | null

    Optional standard five-field cron expression. Consecutive occurrences must be at least five minutes apart. Defaults to null.

  • $.enabledboolean

    Whether scheduled runs are enabled. Defaults to true.

  • $.notification_thresholdinteger

    Consecutive failed runs required before a failure notification is created. Minimum: 1. Defaults to 1.

  • $.recovery_notificationboolean

    Whether a successful run after failures creates a recovery notification. Defaults to true.

Get/api/v1/agentic-tests/<id>View Agentic Test
All endpointsAgentic Tests

View Agentic Test

Returns the complete definition, schedule, notification state, and latest run for one Agentic Test.

GET/api/v1/agentic-tests/<id>

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Path parameters:

  • iduuid

    Agentic Test identifier.

Patch/api/v1/agentic-tests/<id>Update Agentic Test
All endpointsAgentic Tests

Update Agentic Test

Partially updates an Agentic Test. Omitted fields retain their current values; changing scheduling fields recalculates the next run time.

PATCH/api/v1/agentic-tests/<id>

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Path parameters:

  • iduuid

    Agentic Test identifier.

Request parameters:

  • $.namestring

    Replacement human-readable test name. Maximum length: 200 characters.

  • $.gatewaystring

    Replacement AI Gateway slug, gateway identifier, or integrated model name. Maximum length: 200 characters.

  • $.goalstring | object | array

    Replacement goal pursued by the simulated user and evaluated by the judge.

  • $.validation_criteriastring | object | array

    Replacement criteria visible only to the judge.

  • $.startarray

    Replacement initial OpenAI-compatible conversation messages.

  • $.max_turnsinteger

    Replacement maximum simulated user turns, from 2 to 64.

  • $.minimum_turnsinteger

    Replacement first turn on which the simulated user may exit, from 1 to max_turns - 1.

  • $.allow_user_exitboolean

    Replacement setting controlling whether the simulated user may exit after minimum_turns.

  • $.judge_start_turninteger

    Replacement first turn evaluated by the judge, from 1 to max_turns - 1.

  • $.loss_thresholdnumber

    Replacement loss threshold, from 0.01 to 0.99 and more than 0.1 below base_threshold.

  • $.base_thresholdnumber

    Replacement success threshold, from 0.01 to 0.99 and more than 0.1 above loss_threshold.

  • $.profilestring

    Replacement simulator and judge model profile: low, medium, or high.

  • $.user_samplingobject

    Replacement simulated-user sampling configuration.

  • $.user_sampling.top_knumber

    Maximum option-selection range from 0 to 2.

  • $.user_sampling.max_decaynumber

    Maximum probability decay from 0 to 1.

  • $.metadataobject

    Replacement string key/value metadata forwarded to gateway inference.

  • $.resourcesarray

    Replacement list of external context resources. Accepts at most 16 items; supplying it replaces the complete list.

    Examples:

    Replace with inline and remote resources

    Replaces the complete resource list with one internal startup context and one gateway-only per-turn URL.

    [
        {
            "type": "Text",
            "hook": "OnStart",
            "visibility": "Internal",
            "cacheDuration": 900,
            "data": "The customer is eligible for priority support."
        },
        {
            "type": "RemoteResource",
            "hook": "OnTurn",
            "visibility": "Gateway",
            "cacheDuration": 0,
            "data": "https://example.com/current-account-state"
        }
    ]
  • $.resources[].typestring

    Resource source: Text or RemoteResource. Defaults to Text when omitted from an item.

  • $.resources[].hookstring

    Resolution lifecycle: OnStart or OnTurn. Defaults to OnStart when omitted from an item.

  • $.resources[].visibilitystring

    Recipients: Internal, Gateway, or Both. Defaults to Internal when omitted from an item.

  • $.resources[].cacheDurationinteger

    Remote-resource cache duration in seconds, from 0 to 21600. Zero disables caching between resolutions. Defaults to 900 when omitted from an item.

  • $.resources[].datastring

    Required non-empty inline text or remote HTTP/HTTPS URL, according to type.

  • $.external_user_idstring

    Replacement external user identifier forwarded to gateway usage and conversation attribution. Maximum length: 200 characters.

  • $.hooksarray

    Replacement validation callback list. Accepts at most 16 items.

  • $.hooks[].eventstring

    Required callback event: before-test, after-test, before-inference, after-inference, or context-changed. before-inference and after-inference require an AI Gateway rather than an integrated model.

  • $.hooks[].urlstring

    Required public HTTP or HTTPS callback URL. Local and private addresses are rejected.

  • $.cronstring | null

    Replacement standard five-field cron expression. Consecutive occurrences must be at least five minutes apart; null disables scheduling.

  • $.enabledboolean

    Replacement scheduled-run enabled state.

  • $.notification_thresholdinteger

    Replacement consecutive-failure notification threshold. Minimum: 1.

  • $.recovery_notificationboolean

    Replacement recovery-notification setting.

Delete/api/v1/agentic-tests/<id>Delete Agentic Test
All endpointsAgentic Tests

Delete Agentic Test

Permanently deletes one Agentic Test owned by the authenticated account. Its runs are deleted through the configured relationship.

DELETE/api/v1/agentic-tests/<id>

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Path parameters:

  • iduuid

    Agentic Test identifier.

Post/api/v1/generations/validationsEvaluate Agentic Test
All endpointsAgentic Tests

Evaluate Agentic Test

Runs an ephemeral Agentic Test against an AI gateway or integrated model and streams progress as server-sent events. Direct evaluations are not stored as Agentic Test cases or runs. The validations route is retained as a compatibility alias.

POST/api/v1/generations/validations

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Request parameters:

  • $.modelstringRequired

    AI Gateway slug, gateway identifier, or integrated model name to test.

  • $.goalstring | object | arrayRequired

    Goal pursued by the simulated user and evaluated by the judge. Accepts text, one multimodal message part, or an array of message parts.

  • $.validation_criteriastring | object | array | null

    Additional success criteria visible only to the judge. Defaults to null.

  • $.startarray

    Initial OpenAI-compatible conversation messages supplied before simulation begins. Defaults to an empty array.

    Examples:

    Initial conversation

    Starts the evaluation with an existing OpenAI-compatible conversation.

    {
        "model": "checkout-gateway",
        "goal": "Complete checkout successfully",
        "start": [
            {
                "role": "assistant",
                "content": "Welcome. How can I help with your order?"
            },
            {
                "role": "user",
                "content": "I want to complete checkout for the items in my cart."
            }
        ]
    }
  • $.max_turnsinteger

    Maximum simulated user turns, from 2 to 64. Defaults to 10.

  • $.minimum_turnsinteger

    First turn on which the simulated user may end the conversation, from 1 to max_turns - 1. Defaults to 1.

  • $.allow_user_exitboolean

    Whether the simulated user may end the conversation after minimum_turns. Defaults to true.

  • $.judge_start_turninteger

    First turn evaluated by the judge, from 1 to max_turns - 1. Defaults to 1.

  • $.loss_thresholdnumber

    Score below which consecutive judge evaluations contribute to failure, from 0.01 to 0.99. Must be more than 0.1 below base_threshold. Defaults to 0.2.

  • $.base_thresholdnumber

    Score at or above which the goal is achieved, from 0.01 to 0.99. Must be more than 0.1 above loss_threshold. Defaults to 0.9.

  • $.metadataobject

    String key/value metadata forwarded to gateway inference. Defaults to an empty object.

  • $.resourcesarray

    Optional external context resources. Accepts at most 16 items.

    Examples:

    Inline context for internal evaluation

    Resolves inline text once when the evaluation starts and exposes it only to the simulated user and judge.

    [
        {
            "type": "Text",
            "hook": "OnStart",
            "visibility": "Internal",
            "cacheDuration": 900,
            "data": "The customer has a 14-day refund window."
        }
    ]
    Fresh remote context for the gateway

    Fetches the URL before every turn, bypasses cache, and exposes the result only to the tested gateway.

    [
        {
            "type": "RemoteResource",
            "hook": "OnTurn",
            "visibility": "Gateway",
            "cacheDuration": 0,
            "data": "https://example.com/current-inventory"
        }
    ]
    Shared cached remote context

    Fetches the URL once at evaluation startup and exposes the result to all inference participants with a six-hour cache.

    [
        {
            "type": "RemoteResource",
            "hook": "OnStart",
            "visibility": "Both",
            "cacheDuration": 21600,
            "data": "https://example.com/refund-policy"
        }
    ]
  • $.resources[].typestring

    Resource source: Text for inline content or RemoteResource for an HTTP or HTTPS URL. Defaults to Text.

  • $.resources[].hookstring

    Resolution lifecycle: OnStart resolves once when the evaluation starts; OnTurn resolves once before each turn. Defaults to OnStart.

  • $.resources[].visibilitystring

    Recipients: Internal exposes the resource only to the simulated user and judge; Gateway exposes it only to the tested gateway; Both exposes it to all three. Defaults to Internal.

  • $.resources[].cacheDurationinteger

    Remote-resource cache duration in seconds, from 0 to 21600. Zero disables caching between resolutions. Defaults to 900.

  • $.resources[].datastring

    Required non-empty inline text or remote HTTP/HTTPS URL, according to type.

  • $.profilestring

    Simulator and judge model profile: low, medium, or high. Defaults to medium.

  • $.external_user_idstring | null

    External user identifier forwarded to gateway usage and conversation attribution. Maximum length: 200 characters. Defaults to null.

  • $.userstring | null

    Compatibility alias used only when external_user_id is omitted.

  • $.streamboolean

    Accepted for OpenAI compatibility; this endpoint always streams server-sent events regardless of the supplied value.

  • $.user_samplingobject

    Simulated-user sampling configuration.

  • $.user_sampling.top_knumber

    Maximum option-selection range used by the simulated-user sampler, from 0 to 2. Defaults to 0.4.

  • $.user_sampling.max_decaynumber

    Maximum probability decay used by the simulated-user sampler, from 0 to 1. Defaults to 0.02.

Post/api/v1/agentic-tests/<id>/runsRun Agentic Test
All endpointsAgentic Tests

Run Agentic Test

Creates a pending run from the current Agentic Test definition. The background runner executes it according to the account concurrency limit.

POST/api/v1/agentic-tests/<id>/runs

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Path parameters:

  • iduuid

    Agentic Test identifier.

Get/api/v1/agentic-tests/<id>/runsList Agentic Test Runs
All endpointsAgentic Tests

List Agentic Test Runs

Lists retained runs for one Agentic Test in reverse creation order, including execution state and judge outcome.

GET/api/v1/agentic-tests/<id>/runs

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Path parameters:

  • iduuid

    Agentic Test identifier.

Query parameters:

  • statestring

    Optional run-state filter: pending, running, succeeded, failed, or cancelled.

  • limitinteger

    Maximum number of runs to return. Defaults to 50 and is capped at 100.

  • offsetinteger

    Number of runs to skip. Defaults to zero.

Post/api/v1/generations/agentic-testsEvaluate Agentic Test
All endpointsAgentic Tests

Evaluate Agentic Test

Runs an ephemeral Agentic Test against an AI gateway or integrated model and streams progress as server-sent events. Direct evaluations are not stored as Agentic Test cases or runs. The validations route is retained as a compatibility alias.

POST/api/v1/generations/agentic-tests

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Request parameters:

  • $.modelstringRequired

    AI Gateway slug, gateway identifier, or integrated model name to test.

  • $.goalstring | object | arrayRequired

    Goal pursued by the simulated user and evaluated by the judge. Accepts text, one multimodal message part, or an array of message parts.

  • $.validation_criteriastring | object | array | null

    Additional success criteria visible only to the judge. Defaults to null.

  • $.startarray

    Initial OpenAI-compatible conversation messages supplied before simulation begins. Defaults to an empty array.

    Examples:

    Initial conversation

    Starts the evaluation with an existing OpenAI-compatible conversation.

    {
        "model": "checkout-gateway",
        "goal": "Complete checkout successfully",
        "start": [
            {
                "role": "assistant",
                "content": "Welcome. How can I help with your order?"
            },
            {
                "role": "user",
                "content": "I want to complete checkout for the items in my cart."
            }
        ]
    }
  • $.max_turnsinteger

    Maximum simulated user turns, from 2 to 64. Defaults to 10.

  • $.minimum_turnsinteger

    First turn on which the simulated user may end the conversation, from 1 to max_turns - 1. Defaults to 1.

  • $.allow_user_exitboolean

    Whether the simulated user may end the conversation after minimum_turns. Defaults to true.

  • $.judge_start_turninteger

    First turn evaluated by the judge, from 1 to max_turns - 1. Defaults to 1.

  • $.loss_thresholdnumber

    Score below which consecutive judge evaluations contribute to failure, from 0.01 to 0.99. Must be more than 0.1 below base_threshold. Defaults to 0.2.

  • $.base_thresholdnumber

    Score at or above which the goal is achieved, from 0.01 to 0.99. Must be more than 0.1 above loss_threshold. Defaults to 0.9.

  • $.metadataobject

    String key/value metadata forwarded to gateway inference. Defaults to an empty object.

  • $.resourcesarray

    Optional external context resources. Accepts at most 16 items.

    Examples:

    Inline context for internal evaluation

    Resolves inline text once when the evaluation starts and exposes it only to the simulated user and judge.

    [
        {
            "type": "Text",
            "hook": "OnStart",
            "visibility": "Internal",
            "cacheDuration": 900,
            "data": "The customer has a 14-day refund window."
        }
    ]
    Fresh remote context for the gateway

    Fetches the URL before every turn, bypasses cache, and exposes the result only to the tested gateway.

    [
        {
            "type": "RemoteResource",
            "hook": "OnTurn",
            "visibility": "Gateway",
            "cacheDuration": 0,
            "data": "https://example.com/current-inventory"
        }
    ]
    Shared cached remote context

    Fetches the URL once at evaluation startup and exposes the result to all inference participants with a six-hour cache.

    [
        {
            "type": "RemoteResource",
            "hook": "OnStart",
            "visibility": "Both",
            "cacheDuration": 21600,
            "data": "https://example.com/refund-policy"
        }
    ]
  • $.resources[].typestring

    Resource source: Text for inline content or RemoteResource for an HTTP or HTTPS URL. Defaults to Text.

  • $.resources[].hookstring

    Resolution lifecycle: OnStart resolves once when the evaluation starts; OnTurn resolves once before each turn. Defaults to OnStart.

  • $.resources[].visibilitystring

    Recipients: Internal exposes the resource only to the simulated user and judge; Gateway exposes it only to the tested gateway; Both exposes it to all three. Defaults to Internal.

  • $.resources[].cacheDurationinteger

    Remote-resource cache duration in seconds, from 0 to 21600. Zero disables caching between resolutions. Defaults to 900.

  • $.resources[].datastring

    Required non-empty inline text or remote HTTP/HTTPS URL, according to type.

  • $.profilestring

    Simulator and judge model profile: low, medium, or high. Defaults to medium.

  • $.external_user_idstring | null

    External user identifier forwarded to gateway usage and conversation attribution. Maximum length: 200 characters. Defaults to null.

  • $.userstring | null

    Compatibility alias used only when external_user_id is omitted.

  • $.streamboolean

    Accepted for OpenAI compatibility; this endpoint always streams server-sent events regardless of the supplied value.

  • $.user_samplingobject

    Simulated-user sampling configuration.

  • $.user_sampling.top_knumber

    Maximum option-selection range used by the simulated-user sampler, from 0 to 2. Defaults to 0.4.

  • $.user_sampling.max_decaynumber

    Maximum probability decay used by the simulated-user sampler, from 0 to 1. Defaults to 0.02.

Get/api/v1/agentic-tests/<id>/runs/<run-id>View Agentic Test Run
All endpointsAgentic Tests

View Agentic Test Run

Returns an exportable run document with outcome, cost, errors, timestamped user and assistant messages, judge opinions, and per-message token usage.

GET/api/v1/agentic-tests/<id>/runs/<run-id>

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Path parameters:

  • iduuid

    Agentic Test identifier.

  • run-iduuid

    Run identifier.

Post/api/v1/agentic-tests/<id>/runs/<run-id>/cancelCancel Agentic Test Run
All endpointsAgentic Tests

Cancel Agentic Test Run

Cancels a pending run immediately or signals cooperative cancellation for a running test. Terminal runs remain unchanged.

POST/api/v1/agentic-tests/<id>/runs/<run-id>/cancel

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Path parameters:

  • iduuid

    Agentic Test identifier.

  • run-iduuid

    Run identifier.

Generations

Post/api/v1/generations/speechGenerate speech
All endpointsGenerations

Generate speech

Synthesizes speech from text. Set raw to true to receive binary audio; otherwise the response contains base64-encoded audio in the standard JSON envelope.

POST/api/v1/generations/speech

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Post/api/v1/generations/imagesGenerate images
All endpointsGenerations

Generate images

Generates one to four images for each supplied prompt using the selected image model. Optional reference images are supported when the model exposes that capability. Note: it is recommended to use the long inference endpoint at https://direct.inference.aivax.net/, because this endpoint may take a while to respond for some models.

POST/api/v1/generations/images

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Request parameters:

  • $.inputstring | arrayRequired

    Prompt string or non-empty prompt string array.

    Examples:

    Multiple prompts

    Generates images for each prompt in the input array.

    {
        "input": [
            "A kitten playing with a ball",
            "A lighthouse during a winter storm"
        ],
        "count": 1,
        "model": "wan-image-2.7-pro"
    }
  • $.countinteger

    Optional number of images per prompt, from 1 to 4.

  • $.modelstringRequired

    Image model identifier.

  • $.referenceImagesarray

    Optional HTTP(S) reference image URLs.

Post/api/v1/generations/classifyClassify documents
All endpointsGenerations

Classify documents

Embeds supplied documents and labels, then returns every label ordered by cosine similarity for each document.

POST/api/v1/generations/classify

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Request parameters:

  • $.documentsarrayRequired

    Non-empty document strings to classify.

  • $.labelsarrayRequired

    Non-empty labels to score against every document.

Post/api/v1/generations/decisionsEvaluate semantic decisions
All endpointsGenerations

Evaluate semantic decisions

Evaluates named noul, choice, and score questions against a shared state using the selected model.

POST/api/v1/generations/decisions

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Request parameters:

  • $.modelstringRequired

    Semantic model identifier, such as typesafe/jev-1.13.

  • $.stateanyRequired

    JSON value evaluated by all questions, such as a string, array, object, number, boolean, or null. Image-capable models also accept image parts directly in a top-level array, next to plain-string text items: { "type": "image_url", "image_url": { "url": "data:image/png;base64,..." } }. Only base64 data URLs of type image/png, image/jpeg, or image/webp are accepted, and images nested inside objects are not read.

  • $.questionsobjectRequired

    Non-empty object keyed by question name. Each question requires type, instructions, and criteria. Noul criteria require true/false strings; choice criteria map choice names to strings; score criteria are an ordered array of level descriptions.

Post/api/v1/generations/teach-skillTeach skill
All endpointsGenerations

Teach skill

Analyzes one or more tutorial videos and returns reusable skill instructions as a structured Markdown document. Note: it is recommended to use the long inference endpoint at https://direct.inference.aivax.net/, because this endpoint may take a while to respond.

POST/api/v1/generations/teach-skill

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Request parameters:

  • $.videosarrayRequired

    OpenAI-compatible video_url content parts.

Post/api/v1/generations/descriptionsDescribe media
All endpointsGenerations

Describe media

Resolves each OpenAI-compatible multimodal content part into structured JSON. Audio, images, video and PDF files are processed independently and returned in input order. Note: it is recommended to use the long inference endpoint at https://direct.inference.aivax.net/, because this endpoint may take a while to respond for large files.

POST/api/v1/generations/descriptions

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Request parameters:

  • $.inputarrayRequired

    OpenAI-compatible multimodal content parts to describe.

    Examples:

    Image URL

    Describes an image from an HTTP(S) URL.

    {
        "extractionGuidance": "Identify the main subject and visible text.",
        "input": [
            {
                "type": "image_url",
                "image_url": {
                    "url": "https://example.com/image.png",
                    "detail": "high"
                }
            }
        ]
    }
    Video URL

    Describes a video from an HTTP(S) URL.

    {
        "extractionGuidance": "Summarize the sequence of events.",
        "input": [
            {
                "type": "video_url",
                "video_url": {
                    "url": "https://example.com/video.mp4"
                }
            }
        ]
    }
  • $.presetstring

    Optional processing preset: auto or high.

  • $.extractionGuidancestring

    Optional instruction that guides the description.

Post/api/v1/generations/audio/transcriptionsTranscribe audio
All endpointsGenerations

Transcribe audio

Transcribes a base64-encoded WAV, MP3, M4A, FLAC, OGG, WebM or AAC file with an available speech-to-text model.

POST/api/v1/generations/audio/transcriptions

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Request parameters:

  • $.modelstring

    Optional speech-to-text model identifier.

  • $.input_audioobjectRequired

    Base64-encoded audio and its format.

  • $.input_audio.datastringRequired

    Base64-encoded audio bytes.

  • $.input_audio.formatstringRequired

    Audio format: wav, mp3, m4a, flac, ogg, webm or aac.

  • $.languagestring

    Optional language hint.

Conversations

Get/api/v1/conversationsList Conversations
All endpointsConversations

List Conversations

Lists recent conversations for observability, monitoring, and analysis. The list includes message previews, model, serving provider, model variant, routing option, token usage, external user, error state, and usage resources.

GET/api/v1/conversations

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Query parameters:

  • offsetminutesinteger

    Lookback window in minutes when timeStart is omitted. Defaults to 120 and is limited by the account conversation retention period.

  • timeStartstring

    Inclusive ISO 8601 start date, limited by the account conversation retention period.

  • timeEndstring

    Inclusive ISO 8601 end date. Defaults to the current time and must not precede timeStart.

  • filterstring

    Optional command-line style filters. Supported filters: --model|-m, --user|-u, --api-key, --gateway, --chat-client, and --chat-session.

Get/api/v1/conversations/<id>View Conversation
All endpointsConversations

View Conversation

Returns full observability details for one stored conversation, including messages, request metadata, serving provider, provider data collection policy, model variant, routing option, tools, response schema, usage object, resources, timestamps and error details.

GET/api/v1/conversations/<id>

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Path parameters:

  • iduuid

    Identifier of the conversation to retrieve.

Delete/api/v1/conversations/<id>Delete Conversation
All endpointsConversations

Delete Conversation

Deletes a stored conversation from the authenticated account.

DELETE/api/v1/conversations/<id>

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Path parameters:

  • iduuid

    Identifier of the conversation to delete.

Get/api/v1/conversations/<id>/export.jsonExport Conversation (JSON)
All endpointsConversations

Export Conversation (JSON)

Exports a single conversation as a JSON file using the same export options available for the JSONL export.

GET/api/v1/conversations/<id>/export.json

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Path parameters:

  • iduuid

    Identifier of the conversation to export.

Query parameters:

  • periodstring

    Retention guard period. Accepted values: 2h, 1d, 7d, or 30d. Defaults to 7d.

  • mediastring

    Media export mode. Accepted values: text or include. Defaults to text.

  • thinkingstring

    Reasoning export mode. Accepted values: visible, all, or none. Defaults to visible.

  • truncateinteger

    Optional maximum token count for the exported conversation. Use 0 to disable truncation. Maximum value is 1,000,000.

Get/api/v1/conversations/management/export.jsonlExport Conversations (JSONL)
All endpointsConversations

Export Conversations (JSONL)

Exports conversations from the authenticated account as JSONL for offline analysis, audits, and monitoring workflows.

GET/api/v1/conversations/management/export.jsonl

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Query parameters:

  • periodstring

    Export period. Accepted values: 2h, 1d, 7d, or 30d. Defaults to 7d and is limited by the account retention period.

  • mediastring

    Media export mode. Accepted values: text or include. Defaults to text.

  • thinkingstring

    Reasoning export mode. Accepted values: visible, all, or none. Defaults to visible.

  • truncateinteger

    Optional maximum token count per exported conversation. Use 0 to disable truncation. Maximum value is 1,000,000.

Collections

Get/api/v1/collectionsList Collections
All endpointsCollections

List Collections

Lists RAG collections owned by the authenticated account with document counts by indexing state.

GET/api/v1/collections

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Post/api/v1/collectionsCreate Collection
All endpointsCollections

Create Collection

Creates an empty RAG collection that can receive documents and later be searched or attached to an AI Gateway.

POST/api/v1/collections

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Put/api/v1/collections/<collection-id>Edit Collection
All endpointsCollections

Edit Collection

Updates a collection. The request may contain only the fields to change; omitted fields keep their current values. Send null for optional fields such as context or tags to clear them.

PUT/api/v1/collections/<collection-id>

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Path parameters:

  • collection-iduuid

    Identifier of the collection to update.

Get/api/v1/collections/<collection-id>Get Collection Details
All endpointsCollections

Get Collection Details

Returns a collection's name, creation time, indexing state, discovered tags, contextual tags and RAG usage statistics.

GET/api/v1/collections/<collection-id>

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Path parameters:

  • collection-iduuid

    Identifier of the collection to inspect.

Delete/api/v1/collections/<collection-id>Delete Collection
All endpointsCollections

Delete Collection

Deletes the collection and its stored documents for the authenticated account.

DELETE/api/v1/collections/<collection-id>

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Path parameters:

  • collection-iduuid

    Identifier of the collection to delete.

Delete/api/v1/collections/<collection-id>/reset-onlyReset Collection
All endpointsCollections

Reset Collection

Deletes all documents from a collection while keeping the collection record and configuration.

DELETE/api/v1/collections/<collection-id>/reset-only

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Path parameters:

  • collection-iduuid

    Identifier of the collection to empty.

Delete/api/v1/collections/<collection-id>/vectors-onlyUpdate Collection Vectors
All endpointsCollections

Update Collection Vectors

Marks every document vector in the collection as outdated so the indexing job rebuilds embeddings.

DELETE/api/v1/collections/<collection-id>/vectors-only

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Path parameters:

  • collection-iduuid

    Identifier of the collection whose vectors should be rebuilt.

Get/api/v1/collections/<collection-id>/transactionsList Collection RAG Transactions
All endpointsCollections

List Collection RAG Transactions

Lists recent, low-quality, or high-quality RAG transactions for one collection within the account plan retention period.

GET/api/v1/collections/<collection-id>/transactions

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Path parameters:

  • collection-iduuid

    Identifier of the collection to inspect.

Query parameters:

  • viewstring

    View mode. Accepted values: recent, low-quality, or high-quality.

Get/api/v1/collections/<collection-id>/export.jsonlExport Collection
All endpointsCollections

Export Collection

Streams all documents in the collection as JSONL lines containing docid, text, reference and tags.

GET/api/v1/collections/<collection-id>/export.jsonl

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Path parameters:

  • collection-iduuid

    Identifier of the collection to export.

Post/api/v1/collections/<collection-id>/deduplicationStart Collection De-duplication
All endpointsCollections

Start Collection De-duplication

Starts an asynchronous collection de-duplication task. Deleted documents are periodically archived as JSONL files in Backblaze B2 before removal. Completion is reported by app and e-mail notification with backup download links.

POST/api/v1/collections/<collection-id>/deduplication

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Path parameters:

  • collection-iduuid

    Identifier of the collection to de-duplicate.

Query parameters:

  • deltastring

    Duplication sensitivity. Accepted values: low, medium or high. Defaults to medium.

Get/api/v1/collections/<collection-id>/deduplication/estimateEstimate Collection De-duplication
All endpointsCollections

Estimate Collection De-duplication

Estimates processing-unit consumption and cost for asynchronously removing exact and semantic duplicate documents from a collection.

GET/api/v1/collections/<collection-id>/deduplication/estimate

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Path parameters:

  • collection-iduuid

    Identifier of the collection to de-duplicate.

Query parameters:

  • deltastring

    Duplication sensitivity. Accepted values: low, medium or high. Defaults to medium.

Get/api/v1/collections/<collection-id>/transactions/export/jsonlExport Collection RAG Transactions
All endpointsCollections

Export Collection RAG Transactions

Streams the selected RAG transaction view as JSONL.

GET/api/v1/collections/<collection-id>/transactions/export/jsonl

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Path parameters:

  • collection-iduuid

    Identifier of the collection to inspect.

Query parameters:

  • viewstring

    View mode. Accepted values: recent, low-quality, or high-quality.

Get/api/v1/collections/<collection-id>/transactions/<transaction-id>View Collection RAG Transaction
All endpointsCollections

View Collection RAG Transaction

Returns one RAG transaction with cost, timing, scores, reranker metadata, and matched documents.

GET/api/v1/collections/<collection-id>/transactions/<transaction-id>

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Path parameters:

  • collection-iduuid

    Identifier of the collection that owns the transaction.

  • transaction-idinteger

    Identifier of the RAG transaction.

Batch

Get/api/v1/batch/jobsList Account Batch Jobs

List Account Batch Jobs

Lists recent batch jobs across all workflows owned by the authenticated account.

GET/api/v1/batch/jobs

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Query parameters:

  • filterstring

    Optional search over job id or title.

Get/api/v1/batch/workflowsList Batch Workflows

List Batch Workflows

Lists batch workflows owned by the authenticated account, including model, validation status and job count.

GET/api/v1/batch/workflows

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Query parameters:

  • filterstring

    Optional search over workflow id, title, model name or instruction text.

Post/api/v1/batch/workflowsCreate Batch Workflow

Create Batch Workflow

Creates a reusable batch workflow that defines item instructions, result schema, model, validation and retry behavior.

POST/api/v1/batch/workflows

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Get/api/v1/batch/workflows/<workflow-id>View Batch Workflow

View Batch Workflow

Returns a batch workflow's title, timestamps and full processing options.

GET/api/v1/batch/workflows/<workflow-id>

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Path parameters:

  • workflow-iduuid

    Identifier of the workflow to retrieve.

Patch/api/v1/batch/workflows/<workflow-id>Edit Batch Workflow

Edit Batch Workflow

Edits a batch workflow. The request may contain only the fields to change; omitted fields keep their current values. enabledTools is shallow-merged with the existing object when provided, replacing only supplied top-level keys.

PATCH/api/v1/batch/workflows/<workflow-id>

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Path parameters:

  • workflow-iduuid

    Identifier of the workflow to update.

Delete/api/v1/batch/workflows/<workflow-id>Delete Batch Workflow

Delete Batch Workflow

Deletes a batch workflow and all jobs and items created under it.

DELETE/api/v1/batch/workflows/<workflow-id>

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Path parameters:

  • workflow-iduuid

    Identifier of the workflow to delete.

Get/api/v1/batch/workflows/<workflow-id>/jobsList Batch Jobs

List Batch Jobs

Lists jobs under a batch workflow with aggregated processing summary.

GET/api/v1/batch/workflows/<workflow-id>/jobs

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Path parameters:

  • workflow-iduuid

    Identifier of the parent workflow.

Query parameters:

  • filterstring

    Optional search over job id or title.

Post/api/v1/batch/workflows/<workflow-id>/jobsCreate Batch Job

Create Batch Job

Creates a paused job under a batch workflow. Import items, then start the job through the edit endpoint.

POST/api/v1/batch/workflows/<workflow-id>/jobs

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Path parameters:

  • workflow-iduuid

    Identifier of the parent workflow.

Get/api/v1/batch/workflows/<workflow-id>/jobs/<job-id>View Batch Job

View Batch Job

Returns a batch job, aggregated summary, progression timeline and latest processed items.

GET/api/v1/batch/workflows/<workflow-id>/jobs/<job-id>

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Path parameters:

  • workflow-iduuid

    Identifier of the parent workflow.

  • job-iduuid

    Identifier of the batch job to retrieve.

Patch/api/v1/batch/workflows/<workflow-id>/jobs/<job-id>Edit Batch Job

Edit Batch Job

Changes a job title or state. Setting state to Active starts processing; Paused or Finished stops further processing.

PATCH/api/v1/batch/workflows/<workflow-id>/jobs/<job-id>

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Path parameters:

  • workflow-iduuid

    Identifier of the parent workflow.

  • job-iduuid

    Identifier of the batch job to update.

Delete/api/v1/batch/workflows/<workflow-id>/jobs/<job-id>Delete Batch Job

Delete Batch Job

Deletes a batch job and every item under it.

DELETE/api/v1/batch/workflows/<workflow-id>/jobs/<job-id>

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Path parameters:

  • workflow-iduuid

    Identifier of the parent workflow.

  • job-iduuid

    Identifier of the batch job to delete.

Post/api/v1/batch/workflows/<workflow-id>/jobs/<job-id>/itemsImport Batch Job Items

Import Batch Job Items

Imports batch job items from multipart/form-data. Mode 'lines' imports each non-empty file line; mode 'files' imports each uploaded text file as one item; mode 'zip' imports each text file entry as one item; mode 'text' imports the submitted text field as one item.

POST/api/v1/batch/workflows/<workflow-id>/jobs/<job-id>/items

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Path parameters:

  • workflow-iduuid

    Identifier of the parent workflow.

  • job-iduuid

    Identifier of the batch job that will receive items.

Request parameters:

  • modestring

    Import mode: lines, files, zip, or text. Defaults to lines when omitted.

  • itemsfile

    The uploaded file or files. In lines mode, each non-empty line is imported. In files mode, each file is imported as one item. In zip mode, each text entry is imported as one item.

  • documentsfile

    Accepted alias for the items file field.

  • textstring

    Manual item input for text mode.

Get/api/v1/batch/workflows/<workflow-id>/jobs/<job-id>/itemsList Batch Job Items

List Batch Job Items

Lists batch job items with optional state, confidence and text filters and configurable ordering. Results are capped to protect large jobs.

GET/api/v1/batch/workflows/<workflow-id>/jobs/<job-id>/items

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Path parameters:

  • workflow-iduuid

    Identifier of the parent workflow.

  • job-iduuid

    Identifier of the batch job whose items will be listed.

Query parameters:

  • statestring

    Optional item state filter, such as Pending, Finished, ExecutionError or ValidationError.

  • confidencestring

    Optional confidence filter. Accepted values: high, high-confidence, low or low-confidence.

  • filterstring

    Optional text search over item input.

  • sortstring

    Item ordering. Accepted values: inserted-desc, inserted-asc, processed-desc or processed-asc. Defaults to inserted-desc.

  • limitinteger

    Maximum number of items to return. The endpoint enforces an upper bound.

Delete/api/v1/batch/workflows/<workflow-id>/jobs/<job-id>/itemsRemove Batch Job Items

Remove Batch Job Items

Bulk-deletes non-running items from a job by mode: pending, finished, errors or all.

DELETE/api/v1/batch/workflows/<workflow-id>/jobs/<job-id>/items

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Path parameters:

  • workflow-iduuid

    Identifier of the parent workflow.

  • job-iduuid

    Identifier of the batch job whose items will be removed.

Query parameters:

  • modestring

    Deletion mode. Accepted values: pending, finished, errors or all.

Post/api/v1/batch/workflows/<workflow-id>/jobs/<job-id>/items/retryRetry Batch Job Items

Retry Batch Job Items

Moves selected failed or low-confidence non-running items back to pending and starts the job when at least one item is retried.

POST/api/v1/batch/workflows/<workflow-id>/jobs/<job-id>/items/retry

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Path parameters:

  • workflow-iduuid

    Identifier of the parent workflow.

  • job-iduuid

    Identifier of the batch job whose items will be retried.

Query parameters:

  • modestring

    Retry mode. Accepted values: errors, execution-error, validation-error or low-confidence.

Get/api/v1/batch/workflows/<workflow-id>/jobs/<job-id>/export.jsonlExport Batch Job

Export Batch Job

Streams processed batch job items as JSONL, including metadata, input and output. Pending items are not exported.

GET/api/v1/batch/workflows/<workflow-id>/jobs/<job-id>/export.jsonl

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Path parameters:

  • workflow-iduuid

    Identifier of the parent workflow.

  • job-iduuid

    Identifier of the batch job to export.

Query parameters:

  • statestring

    Export state filter. Use all, finished, failed, errors, success or an item state name.

  • confidencestring

    Optional confidence filter. Accepted values: high, high-confidence, low or low-confidence.

Get/api/v1/batch/workflows/<workflow-id>/jobs/<job-id>/items/<item-id>View Batch Job Item

View Batch Job Item

Returns one batch item's input, output, state, validation result, confidence and cost.

GET/api/v1/batch/workflows/<workflow-id>/jobs/<job-id>/items/<item-id>

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Path parameters:

  • workflow-iduuid

    Identifier of the parent workflow.

  • job-iduuid

    Identifier of the parent batch job.

  • item-iduuid

    Identifier of the batch item to retrieve.

Patch/api/v1/batch/workflows/<workflow-id>/jobs/<job-id>/items/<item-id>Edit Batch Job Item

Edit Batch Job Item

Changes a non-running batch item's priority or removes it when action is cancel.

PATCH/api/v1/batch/workflows/<workflow-id>/jobs/<job-id>/items/<item-id>

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Path parameters:

  • workflow-iduuid

    Identifier of the parent workflow.

  • job-iduuid

    Identifier of the parent batch job.

  • item-iduuid

    Identifier of the batch item to update.

Delete/api/v1/batch/workflows/<workflow-id>/jobs/<job-id>/items/<item-id>Delete Batch Job Item

Delete Batch Job Item

Deletes one non-running batch item from a job.

DELETE/api/v1/batch/workflows/<workflow-id>/jobs/<job-id>/items/<item-id>

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Path parameters:

  • workflow-iduuid

    Identifier of the parent workflow.

  • job-iduuid

    Identifier of the parent batch job.

  • item-iduuid

    Identifier of the batch item to delete.

Authentication

Post/api/v1/auth/loginLogin
All endpointsAuthentication

Login

Authenticates an account using its login key and returns a 180-day access token along with basic account information. Rate limited to 10 attempts per minute per remote address.

POST/api/v1/auth/login

AI Gateways

Post/api/v1/ai-gatewaysCreate AI Gateway
All endpointsAI Gateways

Create AI Gateway

Creates an AI Gateway runtime under the authenticated account. The gateway can combine model routing, instructions, RAG collections, built-in tools, protocol functions and MCP sources behind one inference endpoint.

POST/api/v1/ai-gateways

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Get/api/v1/ai-gatewaysList AI Gateways
All endpointsAI Gateways

List AI Gateways

Lists AI Gateways owned by the authenticated account with model, inference endpoint and slug summary fields.

GET/api/v1/ai-gateways

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Query parameters:

  • filter

    An optional filter string to search gateways by name, model name, slug, or ID.

Patch/api/v1/ai-gateways/<id>Edit AI Gateway
All endpointsAI Gateways

Edit AI Gateway

Edits an existing AI gateway. The request may contain only the fields to change; omitted fields keep their current values. When parameters is provided, it is shallow-merged with the existing gateway parameters and only supplied top-level parameter keys are replaced.

PATCH/api/v1/ai-gateways/<id>

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Path parameters:

  • id

    Identifier of the AI Gateway to edit.

Get/api/v1/ai-gateways/<id>View AI Gateway
All endpointsAI Gateways

View AI Gateway

Returns the gateway name, slug and full runtime parameters for one AI Gateway.

GET/api/v1/ai-gateways/<id>

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Path parameters:

  • id

    Identifier of the AI Gateway to retrieve.

Delete/api/v1/ai-gateways/<id>Delete AI Gateway
All endpointsAI Gateways

Delete AI Gateway

Deletes one AI Gateway owned by the authenticated account.

DELETE/api/v1/ai-gateways/<id>

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Path parameters:

  • id

    Identifier of the AI Gateway to delete.

Accounts

Put/api/v1/accountsUpdate Account

Update Account

Replaces the authenticated account display name and account-level parameters.

PUT/api/v1/accounts

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Post/api/v1/accounts/roll-saltRoll Salt

Roll Salt

Generates a new random salt for the account, invalidating webhooks and integrations that depend on the previous salt.

POST/api/v1/accounts/roll-salt

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Get/api/v1/accounts/agent-setup-promptGet Agent Setup Prompt

Get Agent Setup Prompt

Generates a setup prompt URL for configuring an agent to use the authenticated account.

GET/api/v1/accounts/agent-setup-prompt

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

API Keys

Get/api/v1/accounts/api-keyList API Keys

List API Keys

Returns masked private and public API keys for the authenticated account, plus the current account salt used by webhook and integration signatures.

GET/api/v1/accounts/api-key

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Post/api/v1/accounts/api-keyCreate API Key

Create API Key

Creates a private or public API key for the authenticated account and returns the grant key once.

POST/api/v1/accounts/api-key

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Delete/api/v1/accounts/api-key/<key-id>Delete API Key

Delete API Key

Revokes an API key owned by the authenticated account.

DELETE/api/v1/accounts/api-key/<key-id>

Headers:

  • AuthorizationRequired

    The API key used to authenticate the request. Can be provided as a query parameter (api-key).

Path parameters:

  • key-iduuid

    Unique identifier of the API key to delete.

Data structures

API entities

AiGatewayQueryStrategy: [
    "Plain",
    "Concatenate",
    "FullRewrite",
    "UserRewrite",
    "QueryFunction"
]
InferenceMultimodalResolveType: [
    "Image",
    "Audio",
    "Video",
    "File",
    "OtherFiles",
    "All"
]
MultimodalResolverImageEngine: [
    "InferenceLow",
    "InferenceLow",
    "InferenceHigh",
    "Ocr"
]
MultimodalResolverAudioEngine: [
    "InferenceLow",
    "InferenceLow",
    "InferenceHigh",
    "Stt"
]
MultimodalResolverVideoEngine: [
    "InferenceLow",
    "InferenceLow",
    "InferenceHigh"
]
MultimodalResolverFileEngine: [
    "InferenceLow",
    "InferenceLow",
    "InferenceHigh",
    "Ocr"
]
AiModelFlags: [
    "NoSystemInstruct",
    "NoTemperature",
    "ThinkingProcess",
    "NoAssistantPrefilling",
    "ReturnReasoningTokens",
    "DisableMultiModalInput",
    "DiffusingStream",
    "OpenAiStrictJson",
    "StructuredOutputSupport",
    "PreserveThinkingTokens",
    "New",
    "Preview",
    "Deprecated",
    "NoStopParameter",
    "NoReasoningEffort",
    "RewriteToolCallsAsUserMessages",
    "Discounted",
    "Free",
    "DisableReasoningSummary",
    "DisableReasoningDetails",
    "IncludeStoredReasoning",
    "StrictUserAssistantTurns"
]
ContextOverflowAction: [
    "Throw",
    "Truncate",
    "TruncateHard",
    "Compact"
]
InferenceClientTransportInterface: [
    "OpenAiCompatible",
    "OpenAiCompatible",
    "OpenAiResponses"
]
DocumentIndexState: [
    "Queued",
    "Cancelled",
    "Indexed"
]
AudioSynthesisSource: [
    "None",
    "Gpt4oTts",
    "ElevenMultilingualV2",
    "ElevenV3",
    "GrokVoice",
    "ElevenFlash",
    "FishDrama3"
]
WebChatClientInputMode: [
    "Image",
    "Document",
    "Audio"
]
BuiltinFunction: [
    "WebSearch",
    "Code",
    "OpenUrl",
    "Remember",
    "ImageGeneration",
    "XPostsSearch",
    "GenerateDocument",
    "GenerateWebPage",
    "AdvancedWebUsage",
    "Request",
    "DateTime"
]
AccountPlan: [
    "Free",
    "Pro",
    "Max",
    "Custom"
]
SubscriptionUsageLimitType: [
    "None",
    "InferenceSixHours",
    "InferenceWeekly",
    "OcrDaily",
    "RagEmbeddingDaily",
    "ReflexDaily",
    "SemanticDecisionDaily"
]
UsageResourceType: [
    "AiGateway",
    "Collection",
    "ChatClient",
    "ChatClientSession",
    "ApiKey",
    "HostedFunction",
    "BatchWorkflow",
    "BatchWorkflowJob",
    "BatchWorkflowItem",
    "AgenticTestRun",
    "Unknown"
]
LogEntryLevel: [
    "Information",
    "Warning",
    "Error"
]
ConversationOrigin: [
    "ChatCompletionsApi",
    "SessionsApi",
    "FunctionsApi"
]
InferenceMessageRole: [
    "system",
    "user",
    "assistant",
    "tool",
    "developer"
]
InferenceMessageContentType: [
    "text",
    "image_url",
    "input_audio",
    "video_url",
    "file"
]
AiModelStability: [
    "Stable",
    "Unstable",
    "Offline"
]
AiModelCapability: [
    "AudioInput",
    "ImageInput",
    "VideoInput",
    "Thinking",
    "ToolCalling",
    "Uncensored",
    "ModelRouter",
    "Diffusion",
    "FileInput"
]
AiModelRateLimitGroup: [
    "Common",
    "Free",
    "Discounted",
    "Low"
]
AiModelRoutingOption: [
    "Balanced",
    "Cheapest",
    "Fastest",
    "Quality"
]
RagTransactionsView: [
    "recent",
    "low-quality",
    "high-quality"
]
AgenticTestRunState: [
    "pending",
    "running",
    "succeeded",
    "failed",
    "cancelled"
]
BatchWorkflowItemState: [
    "Pending",
    "Finished",
    "Refused",
    "ExecutionError",
    "ValidationError",
    "Cancelled"
]
BatchWorkflowJobState: [
    "Active",
    "Paused",
    "Finished"
]
BatchWorkflowItemSort: [
    "inserted-desc",
    "inserted-asc",
    "processed-desc",
    "processed-asc"
]
BatchWorkflowItemRetryMode: [
    "errors",
    "execution-error",
    "validation-error",
    "low-confidence"
]
BatchWorkflowItemDeleteMode: [
    "pending",
    "finished",
    "errors",
    "all"
]
BatchWorkflowItemConfidenceFilter: [
    "high",
    "high-confidence",
    "low",
    "low-confidence"
]
HookActivationTarget: [
    "Telegram",
    "WhatsApp_ZApi",
    "WhatsApp_Evolution_SelfHosted",
    "WhatsApp_Kapso"
]
UpdateIntegrationsDataIntegrationType: [
    "Zapi",
    "Telegram",
    "EvolutionApi",
    "Kapso"
]
ExportMediaMode: [
    "include",
    "text"
]
ExportThinkingMode: [
    "all",
    "visible",
    "none"
]
CompoundSemanticJobState: [
    "queued",
    "processing",
    "completed",
    "failed",
    "cancelled"
]