API Reference

Complete API reference documentation for Apertis AI

Updated
Reading time
3 min

On this page

Welcome to the Apertis API Reference. This documentation covers all available API endpoints, SDKs, and integration guides.

Choosing an API format

The gateway accepts text generation requests in three formats: Chat Completions, Responses, and Messages. If you're not sure which to use, start with Chat Completions — it's the format the Python SDK's own quick start uses.

Chat Completions Responses Messages
Endpoint path /v1/chat/completions /v1/responses /v1/messages
Compatible SDK OpenAI SDK (chat.completions.create, base_url ends in /v1) or the Apertis SDK OpenAI SDK (responses.create, base_url ends in /v1) or the Apertis SDK Anthropic SDK (messages.create, base_url has no /v1) or the Apertis SDK
Best for OpenAI-compatible chat API Models that only support /v1/responses (e.g. gpt-5-pro, o1-pro, codex-mini); built-in tools; stateful multi-turn Claude models only, via Anthropic-type channels
Streaming stream: true stream: true stream: true, with message_start / content_block_delta / message_stop SSE events
Tool calling tools, tool_choice, parallel_tool_calls tools, tool_choice, max_tool_calls, parallel_tool_calls, plus built-in web_search, code_interpreter, file_search tools, tool_choice
Reasoning / thinking reasoning_effort string; Claude thinking via extra_body; DeepSeek returns reasoning_content reasoning object (effort, summary) thinking object (type, budget_tokens)
Prompt caching See Prompt Cache See Prompt Cache See Prompt Cache
Structured output response_format with json_schema text.format response_format (OpenAI-compatible extended parameter)
  • Pick Chat Completions if you're already using an OpenAI-compatible client and the standard messages array.
  • Pick Responses if your model only supports /v1/responses, or you need built-in tools or stateful multi-turn via previous_response_id.
  • Pick Messages if you're calling Claude models directly and want the native Anthropic SDK and extended thinking.

Text Generation

Multimodal

  • Vision - Image understanding
  • Image Generation - Create images with AI
  • Audio - Speech-to-text and text-to-speech
  • Video - Video generation (not currently available)

Utilities

SDKs & Libraries

Base URL

All API requests should be made to:

https://api.apertis.ai/v1

Authentication

Include your API key in the Authorization header:

Authorization: Bearer YOUR_API_KEY

See API Keys for details on obtaining and managing your API keys.