> ## Documentation Index
> Fetch the complete documentation index at: https://docs.valarhq.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# API Support Matrix

> What each Valar inference API accepts today.

Valar gives you four endpoints. Three are inference surfaces shaped after APIs you already know, and one batches work asynchronously:

| API                         | Endpoint                    | Maturity                                     |
| --------------------------- | --------------------------- | -------------------------------------------- |
| OpenAI **Responses**        | `POST /v1/responses`        | <Badge color="green">Stable</Badge>          |
| OpenAI **Chat Completions** | `POST /v1/chat/completions` | <Badge color="green">Stable</Badge>          |
| Anthropic **Messages**      | `POST /v1/messages`         | <Badge color="green">Stable</Badge>          |
| **Batch**                   | `POST /v1/batches`          | <Badge color="green">Private Preview</Badge> |

The same [models](/models) and [completion windows](/completion-windows) work across all three inference surfaces. The Batch API layers on top: it wraps a large set of [Responses API](#responses-api) calls into one asynchronous job.

## Behavior shared across every API

Before the per-API detail, a few rules hold no matter which surface you call:

* **Streaming is available on Chat Completions and Messages.** Pass `stream: true` and you get Server-Sent Events (`chat.completion.chunk` on Chat Completions, Anthropic-style events on Messages); add `stream_options.include_usage` on Chat Completions for a closing usage chunk. The Responses API rejects `stream: true`. For long jobs, use `background: true` on the Responses API and poll or wait on [webhooks](/webhooks).
* **Completion windows steer scheduling and price.** Set `metadata.completion_window` (or the `X-Valar-Completion-Window` header) to `"asap"` (the **Now** tier), `"priority"`, `"standard"`, or `"flex"` (background only). See [Completion windows](/completion-windows) and [Pricing](/pricing).
* **Webhooks fire on completion.** Set `metadata.completion_webhook` to receive a POST when processing finishes. See [Webhooks](/webhooks).
* **Responses are always stored.** `store: false` is unsupported.

## Inference APIs

Each accordion below lists what the API accepts and what it rejects. Open the one that matches the SDK you're using.

<AccordionGroup>
  <Accordion title="Responses API - POST /v1/responses" defaultOpen>
    <div className="flex flex-wrap items-center gap-2">
      <Badge color="green">Recommended</Badge>
      <Badge color="blue">OpenAI Responses format</Badge>
      <Badge color="blue">OpenAI SDK compatible</Badge>

      <a href="/api-reference/responses-api/create-a-response" className="inline-flex items-center gap-1 rounded-full border border-gray-200 px-2.5 py-1 text-xs font-medium no-underline transition-colors hover:bg-gray-50 dark:border-gray-700 dark:hover:bg-gray-800">
        API reference <span aria-hidden="true">→</span>
      </a>
    </div>

    This is the surface we recommend reaching for first.

    **Supported**

    | Feature                  | Details                                                                                                                                                              |
    | ------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
    | **Core parameters**      | `model`, `input` (string or message array), `max_output_tokens`, `temperature`, `top_p`, `user`, `prompt_cache_key`                                                  |
    | **Structured outputs**   | `text.format` with `type: "text"` or `type: "json_schema"`                                                                                                           |
    | **Reasoning**            | `reasoning.effort` (`none` / `minimal` / `low` / `medium` / `high` / `xhigh`), `reasoning.generate_summary` (`auto` / `concise` / `detailed`)                        |
    | **Function tools**       | `tools` with `type: "function"` - client-side function calling with `name`, `description`, `parameters`, `strict`                                                    |
    | **Custom tools**         | `tools` with `type: "custom"`                                                                                                                                        |
    | **Tool choice**          | `tool_choice`: `"none"`, `"auto"`, `"required"`, or a specific function/custom tool                                                                                  |
    | **Background mode**      | `background: true` returns `202` immediately; poll with `GET /v1/responses/{id}`                                                                                     |
    | **Prompt cache routing** | `prompt_cache_key` is an optional routing hint for requests that share a large prompt prefix                                                                         |
    | **Image input**          | `input_image` content blocks on [multimodal models](/models). Non-multimodal models accept text only.                                                                |
    | **Output logprobs**      | `include: ["message.output_text.logprobs"]` returns one logprob per output token (best effort; omitted for models served via a proxy that does not return logprobs). |

    **Not yet supported**

    | Feature                   | Notes                                                                                                                                                                                                                                                                         |
    | ------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
    | **Streaming**             | `stream: true` is rejected. Every response comes back as one JSON object.                                                                                                                                                                                                     |
    | **Instructions**          | `instructions` is unsupported. Put system messages straight into `input`.                                                                                                                                                                                                     |
    | **Conversation chaining** | `previous_response_id` and `conversation` are unsupported. Resend the full input on each call.                                                                                                                                                                                |
    | **Prompt templates**      | The `prompt` parameter is unsupported.                                                                                                                                                                                                                                        |
    | **Server-side tools**     | `web_search`, `file_search`, `code_interpreter`, `computer_use`, `mcp`, `image_generation`, `shell`, `apply_patch` are unsupported.                                                                                                                                           |
    | **Multimodal input**      | Audio and file input blocks are unsupported. Image input works on multimodal models (see above).                                                                                                                                                                              |
    | **Include**               | Accepted for compatibility when passed as an array of strings. A request is rejected if it includes `reasoning.encrypted_content`, `web_search_call.action.sources`, `code_interpreter_call.outputs`, `computer_call_output.output.image_url`, or `file_search_call.results`. |
    | **Truncation**            | `"disabled"` is the only accepted value; custom truncation strategies are unsupported.                                                                                                                                                                                        |
    | **Parallel tool calls**   | `parallel_tool_calls` is unsupported.                                                                                                                                                                                                                                         |
    | **json\_object format**   | `text.format.type: "json_object"` is unsupported. Reach for `"json_schema"` instead.                                                                                                                                                                                          |
    | **Service tier**          | `"auto"` is the only accepted value. Use `metadata.completion_window` to govern response timing instead.                                                                                                                                                                      |
    | **Delete / cancel**       | `DELETE /v1/responses/{id}` and the cancel endpoints are not implemented.                                                                                                                                                                                                     |
  </Accordion>

  <Accordion title="Chat Completions API - POST /v1/chat/completions">
    <div className="flex flex-wrap items-center gap-2">
      <Badge color="blue">OpenAI Chat Completions format</Badge>
      <Badge color="blue">OpenAI SDK compatible</Badge>

      <a href="/api-reference/chat-completions-api/create-a-chat-completion" className="inline-flex items-center gap-1 rounded-full border border-gray-200 px-2.5 py-1 text-xs font-medium no-underline transition-colors hover:bg-gray-50 dark:border-gray-700 dark:hover:bg-gray-800">
        API reference <span aria-hidden="true">→</span>
      </a>
    </div>

    This surface streams `chat.completion.chunk` events.

    **Supported**

    | Feature                 | Details                                                                                                                                                                                                                  |
    | ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
    | **Core parameters**     | `model`, `messages`, `max_completion_tokens`, `temperature`, `top_p`, `user`                                                                                                                                             |
    | **Message roles**       | `system`, `user`, `assistant`, `tool`, `function` (deprecated), `developer`                                                                                                                                              |
    | **Structured outputs**  | `response_format` with `type: "text"`, `"json_object"`, or `"json_schema"`                                                                                                                                               |
    | **Reasoning**           | `reasoning_effort` (`none` / `minimal` / `low` / `medium` / `high` / `xhigh`)                                                                                                                                            |
    | **Function tools**      | `tools` with `type: "function"` - standard `{type, function: {name, description, parameters, strict}}` format                                                                                                            |
    | **Custom tools**        | `tools` with `type: "custom"`                                                                                                                                                                                            |
    | **Tool choice**         | `tool_choice`: `"none"`, `"auto"`, `"required"`, or a specific function/custom tool                                                                                                                                      |
    | **Parallel tool calls** | `parallel_tool_calls` is passed through                                                                                                                                                                                  |
    | **Metadata**            | `metadata` with string key-value pairs, including `completion_window` and `completion_webhook`                                                                                                                           |
    | **Streaming**           | `stream: true` returns Server-Sent Events (`chat.completion.chunk`); `stream_options.include_usage` adds a final usage chunk. Reasoning is streamed as `reasoning_content` deltas and tool calls are emitted atomically. |
    | **Image input**         | `image_url` content parts on [multimodal models](/models). Non-multimodal models accept text only.                                                                                                                       |

    **Not yet supported**

    | Feature                | Notes                                                                                                                           |
    | ---------------------- | ------------------------------------------------------------------------------------------------------------------------------- |
    | **Multiple choices**   | `n` is required to be `1`.                                                                                                      |
    | **Multimodal content** | Audio (`input_audio`) content parts are unsupported. Image (`image_url`) input works on multimodal models (see above).          |
    | **Sampling controls**  | `frequency_penalty`, `presence_penalty`, `logit_bias`, `stop`, `seed`, `top_logprobs`, `logprobs`, `verbosity` are unsupported. |
    | **Audio modality**     | Neither `audio` nor `modalities: ["audio"]` is supported.                                                                       |
    | **Predicted output**   | `prediction` is unsupported.                                                                                                    |
    | **Web search**         | `web_search_options` is unsupported.                                                                                            |
    | **Service tier**       | `"auto"` is the only accepted value.                                                                                            |
    | **CRUD endpoints**     | The `GET`, `POST`, and `DELETE` operations on stored completions are not implemented.                                           |
    | **Deprecated fields**  | `max_tokens`, `functions`, and `function_call` are rejected; switch to their modern replacements.                               |

    **What comes back**

    * A response always carries exactly one choice (`n=1`).
    * `finish_reason` is either `"stop"` or `"tool_calls"` - values such as `"length"` and `"content_filter"` are never returned.
    * Neither `system_fingerprint` nor `service_tier` appears in responses.
    * `logprobs` is always `null`.
  </Accordion>

  <Accordion title="Messages API - POST /v1/messages">
    <div className="flex flex-wrap items-center gap-2">
      <Badge color="blue">Anthropic Messages format</Badge>
      <Badge color="blue">Anthropic SDK compatible</Badge>

      <a href="/anthropic-sdk" className="inline-flex items-center gap-1 rounded-full border border-gray-200 px-2.5 py-1 text-xs font-medium no-underline transition-colors hover:bg-gray-50 dark:border-gray-700 dark:hover:bg-gray-800">
        API reference <span aria-hidden="true">→</span>
      </a>
    </div>

    Valar's Anthropic-compatible surface. The [Anthropic Python SDK](/anthropic-sdk) and the Claude Agent SDK work against it with a base URL and key change.

    **Supported**

    | Feature                      | Details                                                                                                                                            |
    | ---------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
    | **Core parameters**          | `model`, `max_tokens` (required), `messages`, `system` (string or content blocks)                                                                  |
    | **Sampling**                 | `temperature` (0–1), `top_p` (0–1), `top_k`                                                                                                        |
    | **Streaming**                | `stream: true` returns Anthropic SSE events (`message_start`, `content_block_delta`, `message_delta`, `message_stop`)                              |
    | **Extended thinking**        | `thinking` with `type: "enabled"` and `budget_tokens`, or `output_config.effort` (`low` / `medium` / `high` / `xhigh` / `max`)                     |
    | **Structured outputs**       | `output_config.format` with `type: "json_schema"` (translated to the Responses API's `text.format`); see [Structured outputs](/structured-outputs) |
    | **Function tools**           | `tools` with `name`, `description`, `input_schema`; `tool_choice` (`auto` / `any` / `{type:"tool",name}`)                                          |
    | **Tool-result blocks**       | `tool_result` content blocks in subsequent `user` messages                                                                                         |
    | **Stop sequences**           | `stop_sequences`                                                                                                                                   |
    | **Image input**              | `image` content blocks on [multimodal models](/models). Non-multimodal models accept text only.                                                    |
    | **Metadata**                 | `metadata` with string key-value pairs, including `completion_window` and `completion_webhook`                                                     |
    | **Completion window header** | `X-Valar-Completion-Window` (`asap` / `priority` / `standard` / `flex`) as a fallback when `metadata.completion_window` is absent                  |
    | **Count tokens**             | `POST /v1/messages/count_tokens` returns an estimated token count                                                                                  |

    **Not yet supported**

    | Feature                | Notes                                                                                                      |
    | ---------------------- | ---------------------------------------------------------------------------------------------------------- |
    | **Multimodal content** | Document (`document`) content blocks are unsupported. Image input works on multimodal models (see above).  |
    | **Service tier**       | `service_tier` is unsupported. Use `metadata.completion_window` or the `X-Valar-Completion-Window` header. |
    | **Inference geo**      | `inference_geo` is unsupported.                                                                            |
    | **Batches**            | `POST /v1/messages/batches` and its related endpoints are not implemented.                                 |

    **What comes back**

    * `stop_reason` is `end_turn`, `tool_use`, or `max_tokens`. (A run halted on a `stop_sequences` match comes back as `end_turn`, not `stop_sequence`.)
    * The response content is one or more blocks: `text`, `thinking`, and `tool_use`.
    * `usage` includes `input_tokens`, `output_tokens`, `cache_read_input_tokens`, and `cache_creation_input_tokens`.

    **Authenticating with the Anthropic SDK**

    Valar accepts both `Authorization: Bearer <key>` (the OpenAI convention) and the Anthropic `x-api-key: <key>` header. With the Anthropic SDK, either `auth_token` or `api_key` works:

    ```python theme={"system"}
    from anthropic import Anthropic

    client = Anthropic(
        auth_token="YOUR_VALAR_API_KEY",  # sends Authorization: Bearer
        base_url="https://api.valarhq.ai",  # no /v1 — the SDK appends it
    )
    ```

    The `anthropic-version` header is neither required nor inspected, and errors come back in the OpenAI-style error envelope format. See [Anthropic SDK & Claude Agent SDK](/anthropic-sdk) for end-to-end examples.
  </Accordion>
</AccordionGroup>

## Batch API

The Batch API runs large volumes of [Responses API](#responses-api) requests asynchronously. Every entry targets `/v1/responses` - you can't batch `/v1/chat/completions` or `/v1/messages` today. One `POST /v1/batches` call takes up to 100,000 requests; you then poll `GET /v1/batches/{id}` for status and fetch each result by its `custom_id`.

For the end-to-end workflow, see [Sending Requests at Scale](/requests_at_scale); for the request and response schemas, see the [Batch API reference](/api-reference/batches-api/create-a-batch).
