# LLM API Protocols

Atlas Cloud speaks OpenAI Chat Completions, Completions, Responses, Images, Anthropic Messages, and Google Gemini. One key, one base URL, six wire formats.

Source: https://atlascloud.ai/docs/en/llm-protocols

Atlas Cloud accepts six different request formats on the same base URL with the same API key. Point an existing SDK at Atlas Cloud and it generally works unchanged — no rewrite, no adapter layer of your own.

```
https://api.atlascloud.ai
```

## Protocol matrix

| Protocol | Endpoint | Use it when |
| --- | --- | --- |
| OpenAI Chat Completions | `POST /v1/chat/completions` | Default choice. Widest model coverage |
| OpenAI Completions | `POST /v1/completions` | Legacy text completion. Few models support it |
| OpenAI Responses | `POST /v1/responses` | You already use the Responses API |
| OpenAI Images | `POST /v1/images/generations`, `/v1/images/edits` | Synchronous image calls through an OpenAI client |
| Anthropic Messages | `POST /v1/messages` | You already use the Anthropic SDK or Claude Code |
| Google Gemini | `POST /v1beta/models/{model}:generateContent` | You already use the Google GenAI SDK |

<Callout type="warn">
Not every model speaks every protocol. Each model publishes a `supported_apis` list — check it before switching formats. The list is ordered: the first entry is the recommended one for that model. Gemini-family models, for example, expose their full multimodal capability only on the native Gemini format.
</Callout>

## Authentication

Your API key works with any of four header styles, so SDKs built for other providers authenticate without modification:

<Tabs groupId="auth" items={['Bearer', 'Anthropic', 'Google', 'Query']}>
<Tab value="Bearer">
```bash
-H "Authorization: Bearer $ATLASCLOUD_API_KEY"
```
Recommended, and works with every protocol.
</Tab>
<Tab value="Anthropic">
```bash
-H "x-api-key: $ATLASCLOUD_API_KEY"
```
The default for the Anthropic SDK.
</Tab>
<Tab value="Google">
```bash
-H "x-goog-api-key: $ATLASCLOUD_API_KEY"
```
The default for the Google GenAI SDK.
</Tab>
<Tab value="Query">
```bash
"https://api.atlascloud.ai/v1beta/models/MODEL:generateContent?key=$ATLASCLOUD_API_KEY"
```
Supported for older Gemini clients. Prefer a header — query strings leak into logs.
</Tab>
</Tabs>

Atlas Cloud API keys begin with `apikey-`. See [API Keys](/api-keys).

## OpenAI Chat Completions

The most widely supported format.

```bash
curl https://api.atlascloud.ai/v1/chat/completions \
  -H "Authorization: Bearer $ATLASCLOUD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "deepseek-ai/deepseek-v3.2",
    "messages": [{"role": "user", "content": "Explain HTTP vs HTTPS"}],
    "max_tokens": 1024,
    "stream": true
  }'
```

Using the OpenAI SDK — change two lines:

<Tabs groupId="lang" items={['Python', 'Node.js']}>
<Tab value="Python">
```python
from openai import OpenAI

client = OpenAI(
    api_key=os.environ["ATLASCLOUD_API_KEY"],
    base_url="https://api.atlascloud.ai/v1",
)

response = client.chat.completions.create(
    model="deepseek-ai/deepseek-v3.2",
    messages=[{"role": "user", "content": "Explain HTTP vs HTTPS"}],
)
print(response.choices[0].message.content)
```
</Tab>
<Tab value="Node.js">
```javascript
import OpenAI from "openai";

const client = new OpenAI({
  apiKey: process.env.ATLASCLOUD_API_KEY,
  baseURL: "https://api.atlascloud.ai/v1",
});

const response = await client.chat.completions.create({
  model: "deepseek-ai/deepseek-v3.2",
  messages: [{ role: "user", content: "Explain HTTP vs HTTPS" }],
});
console.log(response.choices[0].message.content);
```
</Tab>
</Tabs>

**Sampling parameters.** Support varies per model — each model publishes its own `supported_sampling_parameters`. Commonly available: `temperature` (0–2), `top_p` (0–1), `top_k`, `min_p`, `frequency_penalty` (−2–2), `presence_penalty` (−2–2), `repetition_penalty`, `stop`, `seed`, `logit_bias`, `logprobs`, `top_logprobs` (0–20).

**Structured output.** `response_format` accepts both `{"type": "json_object"}` and a `json_schema` definition, on models that advertise `json_mode` or `structured_outputs`.

**Tool calling.** `tools`, `tool_choice`, and `parallel_tool_calls` are passed through on models that advertise `tools`.

**Multimodal input.** Images, video, and audio can be attached as content parts:

```json
{
  "role": "user",
  "content": [
    { "type": "text", "text": "What is in this image?" },
    { "type": "image_url", "image_url": { "url": "https://example.com/photo.jpg" } },
    { "type": "video_url", "video_url": { "url": "https://example.com/clip.mp4" } },
    { "type": "input_audio", "input_audio": { "data": "<base64>", "format": "mp3" } }
  ]
}
```

`video_url` is an Atlas Cloud extension beyond the OpenAI specification. Audio must be inline Base64 — a URL is not accepted for `input_audio`.

## Anthropic Messages

```bash
curl https://api.atlascloud.ai/v1/messages \
  -H "x-api-key: $ATLASCLOUD_API_KEY" \
  -H "anthropic-version: 2023-06-01" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "deepseek-ai/deepseek-v3.2",
    "max_tokens": 1024,
    "messages": [{"role": "user", "content": "Hello"}]
  }'
```

Point the Anthropic SDK at Atlas Cloud by setting `base_url` to `https://api.atlascloud.ai`.

**Supported.** `system` (string or block array), `stop_sequences`, `tools` with `input_schema`, `tool_choice`, `thinking`, image blocks (both `base64` and `url` sources), `document` blocks, and `tool_result`. Assistant `thinking` blocks map to reasoning output.

**Differences to know about:**

| Behavior | Detail |
| --- | --- |
| `stop_sequences` | Truncated to the first 4 entries |
| `tool_choice: "any"` | Mapped to `required` |
| `cache_control` | Ignored when the target model is served through a translated protocol, so prompt caching will not apply |
| Built-in server tools | Web search, computer use, and similar Anthropic-hosted tools are not available |
| `POST /v1/messages/count_tokens` | Not implemented |
| Multimodal | **Images only.** Video and audio parts are not accepted on this protocol |

**Streaming** follows the Anthropic event sequence: `message_start`, `content_block_start`, `content_block_delta`, `content_block_stop`, `message_delta`, `message_stop`. There is no `[DONE]` sentinel.

## OpenAI Responses

```bash
curl https://api.atlascloud.ai/v1/responses \
  -H "Authorization: Bearer $ATLASCLOUD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "deepseek-ai/deepseek-v3.2",
    "input": [{"role": "user", "content": [{"type": "input_text", "text": "Hello"}]}],
    "max_output_tokens": 1024
  }'
```

**Supported.** `instructions`, `input` in all its shapes, `tools`, `tool_choice`, `reasoning.effort`, `text.format` (both `json_object` and `json_schema`), `text.verbosity`, `temperature`, `top_p`, `stream`, `parallel_tool_calls`.

**Silently ignored** — accepted without error but with no effect: `previous_response_id`, `store`, `include`, `background`, `conversation`, `prompt`, `truncation`, `max_tool_calls`, `top_logprobs`, and `reasoning.summary`. `metadata` is echoed back but not forwarded.

<Callout type="warn">
Because `previous_response_id` and `store` have no effect, **server-side conversation state is not available**. Send the full conversation with each request.
</Callout>

**Multimodal.** Images and audio. No video on this protocol. Images use `{"type": "input_image", "image_url": "<url string>"}` — note the value is a plain string, not an object.

**Streaming** emits the standard Responses event set, ending with `response.completed`, `response.incomplete`, or `response.failed`. There is no `[DONE]` sentinel.

## Google Gemini

```bash
# Non-streaming
curl "https://api.atlascloud.ai/v1beta/models/MODEL_ID:generateContent" \
  -H "x-goog-api-key: $ATLASCLOUD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "contents": [{"role": "user", "parts": [{"text": "Hello"}]}],
    "generationConfig": {"maxOutputTokens": 1024, "temperature": 0.7}
  }'

# Streaming — the alt=sse parameter is required
curl "https://api.atlascloud.ai/v1beta/models/MODEL_ID:streamGenerateContent?alt=sse" \
  -H "x-goog-api-key: $ATLASCLOUD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"contents": [{"role": "user", "parts": [{"text": "Hello"}]}]}'
```

<Callout type="warn">
`?alt=sse` is mandatory for streaming. Without it the request returns 404.
</Callout>

**Supported.** `contents[]` with `user` and `model` roles, `systemInstruction`, `generationConfig`, and `tools`.

**Multimodal.** Images, video, and audio — inline via `inline_data`, or by reference via `file_data.file_uri`.

This protocol is served only by models that natively speak it. Models whose identifier contains `nano`, `banana`, or `omni` are rejected here; use Chat Completions or the media generation endpoints for those instead.

## OpenAI Images

Synchronous image generation for OpenAI-compatible clients:

```bash
curl https://api.atlascloud.ai/v1/images/generations \
  -H "Authorization: Bearer $ATLASCLOUD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "MODEL_ID", "prompt": "a cat", "n": 1, "size": "1024x1024"}'
```

`/v1/images/edits` takes `multipart/form-data`. Only a small number of models advertise this protocol.

<Callout>
This is a different path from the main image pipeline. Most image models — and all video, audio, and 3D models — use the asynchronous endpoints described in [Predictions](/predictions). Check a model's `supported_apis` before choosing.
</Callout>

## Gateway behavior

The gateway normalizes a few things on the way through. These are not in the upstream specifications, and they will surprise you if you are debugging a response:

| Behavior | Applies to | Detail |
| --- | --- | --- |
| Usage stats forced on | Streaming requests | `stream_options.include_usage` is set to `true`, so a final usage chunk always arrives |
| Default system prompt | Chat Completions, Messages, Responses | If you send no system prompt, `"You are a helpful assistant."` is inserted |
| `max_completion_tokens` rewritten | Chat Completions | Converted to `max_tokens` |
| Reasoning flags normalized | Chat Completions | `enable_thinking`, `thinking.type`, and `reasoning_effort: "none"` are unified |
| Keep-alive comments | Streaming | Idle streams emit SSE comment lines starting with `:`. **Clients must ignore them** |
| Request body limit | All endpoints | 50 MB. Larger payloads return 413 — use a URL or [upload the file](/upload-files) |

## Not available

These endpoints do not exist on Atlas Cloud. Requests to them will not work regardless of the model:

- `/v1/embeddings`
- `/v1/rerank`
- `/v1/audio/speech` and `/v1/audio/transcriptions` — audio goes through [the audio endpoint](/models/audio)
- `/v1/messages/count_tokens`

Providers such as Ollama, Cohere, and Bedrock are not exposed as native protocols. Models from many vendors are available, but always through one of the six formats above.

## Rate limits and errors

Rate limits apply per account and per model. When you exceed one, the API returns `429`.

<Callout type="warn">
LLM endpoints do **not** return `X-RateLimit-*` headers, and `429` responses on these endpoints do not carry `Retry-After`. Implement exponential backoff on the client side rather than relying on response headers.
</Callout>

Every response carries an `X-Request-ID` header. Include it when contacting support.

## Related

<Cards>
  <Card title="LLM Models" href="/models/llm" description="Which models are available and what they cost." />
  <Card title="Audio Models" href="/models/audio" description="Speech, music, and transcription." />
  <Card title="API Keys" href="/api-keys" description="Create a key and scope it." />
  <Card title="Predictions" href="/predictions" description="The asynchronous flow for media generation." />
</Cards>
