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

# Messages and Responses APIs

> Same models, Anthropic SDK or Responses API.

## Messages API

Thinking: a `thinking` block, empty signature.

```bash curl wrap theme={null}
curl https://gateway.os3compute.com/v1/messages \
  -H "x-api-key: $OS3_GATEWAY_KEY" \
  -H "anthropic-version: 2023-06-01" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "deepseek/deepseek-v4.1-flash-1017",
    "max_tokens": 1024,
    "messages": [{"role": "user", "content": "What is 17 * 23?"}]
  }'
```

```python Python wrap theme={null}
# pip install anthropic
import os

from anthropic import Anthropic

client = Anthropic(
    base_url="https://gateway.os3compute.com",
    api_key=os.environ["OS3_GATEWAY_KEY"],
)
message = client.messages.create(
    model="deepseek/deepseek-v4.1-flash-1017",
    max_tokens=1024,
    messages=[{"role": "user", "content": "What is 17 * 23?"}],
)
print([b.text for b in message.content if b.type == "text"])
```

## Responses API

Stateless: send the whole conversation each turn. `"store": true`: refused.

```python Python wrap theme={null}
response = client.responses.create(
    model="deepseek/deepseek-v4.1-flash-1017",
    input="What is 17 * 23?",
)
print(response.output_text)
```

`client`: as in the [quickstart](https://docs.os3compute.com/index.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.