Skip to main content
Air API provides an endpoint that is compatible with the OpenAI API. If your application already uses the OpenAI SDK, you only need to replace two settings — the base URL and the API key — to get started.

Quick Start

Update just two lines in your existing OpenAI code.
See the Authentication page for how to generate an API key.

Base URL

Each model has its own endpoint URL. Replace <endpoint_id> with the endpoint ID from the table below.
For example, for Qwen3.6-35B-A3B:
The endpoint ID in the URL and the model ID passed as the model parameter use different notation. If the model value does not exactly match the model ID in the table below, the API returns a 404 error (The model ... does not exist.).

Supported Models and Features

✅ supported · ❌ not supported · - not applicable or TBD

Response Format

Chat Completions responses use the same structure as the OpenAI API.

Streaming

Set the stream option to true to receive the response in real time as SSE (Server-Sent Events). (Default: false)
  • Each chunk delivers a text fragment in choices[0].delta.content, and the stream ends with a data: [DONE] event.
  • Send stream_options={"include_usage": true} to receive token usage (usage) in the final chunk.
Streaming is currently supported on Qwen3.6-35B-A3B, Qwen3.5-9B, Qwen3-32B, and Llama3.3-70B.

Tool Calling (Function Calling)

Lets the model call external functions or services. Supported on Qwen3.6-35B-A3B, Qwen3.5-9B, Qwen3-32B, and Llama3.3-70B. Tool calling is a three-step flow: define functions and send the request, the model suggests a function call, then execute the function and send back the result. The model does not execute functions itself — it only generates which function to call and with what arguments.

1. Define your functions and send the request

2. The model suggests a function call

When the model decides a function call is needed, it returns a tool_calls array with finish_reason: "tool_calls".
function.arguments is returned as a JSON string — parse it with json.loads() (or equivalent) before use. The model may return multiple function calls at once, so iterate over the entire tool_calls array.

3. Execute the function and return the result

Append the result as a role: "tool" message and send the request again — the model generates the final answer based on the result.

tool_choice options

Even with tool_choice: "none", the model may still emit function-call-shaped text in the response body if tools definitions remain in the request. When you don’t need function calls, the most reliable approach is to omit the tools parameter entirely.

Parallel tool calls

The model can return multiple function calls in a single response via the tool_calls array. Set parallel_tool_calls to false (default true) to limit the model to one function call at a time.

Streaming tool calls

With stream: true, tool call data arrives split across chunks. The first chunk of each tool call carries id and function.name, and subsequent chunks deliver function.arguments in sequence. Group tool calls by index, then concatenate function.arguments in arrival order. The stream ends with a chunk carrying finish_reason: "tool_calls".

Vision (Image Input)

Qwen3.6-35B-A3B and Qwen3.5-9B accept image input. Pass messages[].content as an array and include images with the image_url type. image_url.url accepts an externally reachable image URL or a base64-encoded data URI (data:image/jpeg;base64,...).
The number of images per request is limited per model — Qwen3.6-35B-A3B: up to 4, Qwen3.5-9B: up to 1. Video input is not supported.

Reasoning

Qwen3.6-35B-A3B and Qwen3.5-9B support reasoning (thinking). The reasoning trace is returned separately from the final answer (content) in the reasoning field.
  • Reasoning text also consumes max_tokens. Set it generously — if the value is too small, the answer may get cut off.
  • When streaming, reasoning fragments arrive first via delta.reasoning, followed by delta.content.
  • Qwen3-32B returns its reasoning inline as <think> tags inside content instead of the reasoning field. It can likewise be disabled with enable_thinking: false.

Disabling reasoning

To get an answer directly without reasoning, turn it off via chat_template_kwargs.

JSON Mode (Structured Outputs)

Set response_format to always receive valid JSON.
Also instruct the model to respond in JSON in your prompt for more reliable results. Reasoning consumes tokens and can truncate the JSON, so combining JSON mode with disabled reasoning is recommended.

Embedding

Converts text into vectors, useful for semantic search, recommendation systems, and RAG. You can also pass an array of strings as input to embed multiple texts in a single request.

Supported Parameters

Air API supports the core OpenAI parameters based on the official vLLM spec.
vLLM extension sampling parameters such as top_k, min_p, and repetition_penalty are also available. With the OpenAI SDK, pass them via extra_body.

API Usage Guide

Learn the full flow for secret key authentication and code-based API integration.

Available Models

See specs and pricing for every model.

Troubleshooting

Find solutions to common issues and errors.

API Reference

Explore detailed API specifications, including endpoints and parameters.