> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.mixlayer.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.mixlayer.com/_mcp/server.

# Quickstart

> Make your first request to Mixlayer in under a minute

You'll have a working chat completion in three steps.

## 1. Get an API key

Sign up at [console.mixlayer.com](https://console.mixlayer.com/sign-up) and create an API key from the [API Keys](https://console.mixlayer.com/app/api-keys) page in the console. Export it in your shell:

```bash
export MIXLAYER_API_KEY="..."
```

## 2. Send your first request

Mixlayer is OpenAI-compatible. The base URL is `https://mixlayer.ai/v1`.

#### curl

**`file=`**

```bash file=quickstart.sh
curl https://mixlayer.ai/v1/chat/completions \
  -H "Authorization: Bearer $MIXLAYER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "qwen/qwen3.5-4b-free",
    "messages": [
      {"role": "user", "content": "Tell me a fun fact about chihuahuas."}
    ]
  }'
```

#### Python

**`file=`**

```python file=quickstart.py
import os
from openai import OpenAI

client = OpenAI(
    api_key=os.environ["MIXLAYER_API_KEY"],
    base_url="https://mixlayer.ai/v1",
)

response = client.chat.completions.create(
    model="qwen/qwen3.5-4b-free",
    messages=[
        {"role": "user", "content": "Tell me a fun fact about chihuahuas."},
    ],
)

print(response.choices[0].message.content)
```

> **Info**
>
> `qwen/qwen3.5-4b-free` is on the free tier and great for trying
> things out. See the [Models](/models) page for the full catalog.

## 3. Go deeper

* **[Client Libraries](/client-libraries)** — install instructions and examples for Python, TypeScript, Rust, and curl
* **[Chat Completions](/api-reference/inference-ap-is/chat-completions/chat-completions)** — full reference for every supported request parameter
* **[Tool Calling](/tool-calling)** — let the model invoke your functions
* **[Reasoning](/reasoning)** — read the model's chain of thought