Skip to main content
Aesoteric accepts three request formats. All of them use the same keys, models, prices and limits. The base URL is https://api.aesoteric.ai/v1 for OpenAI clients and https://api.aesoteric.ai for Anthropic clients. Streaming and non-streaming requests work in every format. A request returns one answer.

Chat Completions

  • messages is required and can’t be empty.
  • n must be 1.
  • Set the output limit with max_tokens (or max_completion_tokens). It can be at most your chosen model’s context size minus the input; a larger value is answered 400 with the largest value allowed.
  • reasoning_effort sets how much a model reasons. Use a value from that model’s reasoning.supported_efforts, listed in the model catalog.
  • A stream always ends with a chunk that carries usage, including usage.cost.
  • web_search_options is answered 400: there is no web search.

Messages (Anthropic)

Tool use, system as text or blocks, images and streaming events work as in Anthropic’s API.
  • Send the key as x-api-key or Authorization: Bearer.
  • model must be an Aesoteric model id. Claude model names, such as claude-*, are answered 404 not_found_error.
  • max_tokens is required, and can be at most your chosen model’s context size minus the input.
  • thinking sets the reasoning effort: disabled turns it off, enabled picks an effort from budget_tokens (below 1024 minimal, below 2048 low, below 4096 medium, otherwise high), and adaptive uses output_config.effort or medium. reasoning_effort also works and wins over thinking. Reasoning comes back as thinking content blocks.
  • input_tokens excludes cached input, which is in cache_read_input_tokens. cache_creation_input_tokens is always 0.
  • cache_control is accepted and ignored: caching is automatic. See Prompt caching.
  • The hosted web search tool (web_search_*) is answered 400, and the whole request is refused. Remove the tool from your request.
  • /v1/messages/batches is not available.

Count tokens

POST /v1/messages/count_tokens takes the same body without max_tokens and answers {"input_tokens": N}. Counting is free. It has its own per-minute limit, equal to your tier’s requests per minute, so counts never use up your request limit.

Responses

Responses are not stored. Send the whole conversation in input each time.
  • store: true, background: true, previous_response_id, conversation and prompt are answered 400. store: false and no store work, and every answer says "store": false.
  • Only POST /v1/responses is available: retrieving, deleting, cancelling or compacting a response, input_items, input_tokens and WebSocket mode are not.
  • Tools: function, custom and namespace tools work. Hosted web search (web_search, web_search_preview) is removed from the request, and a tool_choice naming it becomes auto. Any other hosted tool (mcp, file_search, code_interpreter and others) is answered 400.
  • tool_choice can be none, auto, required or a function or custom tool. Anything else, allowed_tools included, is answered 400.
  • reasoning.effort sets how much a model reasons. Reasoning comes back as a reasoning output item; a stream sends it as response.reasoning_summary_text events.
  • Set the output limit with max_output_tokens.
  • input_tokens includes cached input, which is also in input_tokens_details.cached_tokens.
  • prompt_cache_key is ignored.
  • An input too long for the context is answered with the code context_length_exceeded. A stream that fails after it started ends with response.failed, never response.completed.

Usage and cost

Every completed answer reports what it is charged, in USD, as cost in its usage: cost is absent when nothing is charged, such as for a failed request. See Billing.