# Quickstart: send your first request
URL: https://docs.munito.ai/quickstart

1. Open [API keys in the console](https://console.munito.ai/keys).
2. Create a key with the **Inference** permission, and copy it. The console shows it one time only.
3. Run one of the scripts below. Put your key in place of `munitoai_...`.

## OpenAI Chat Completions API [#openai-chat-completions-api]

Each tab is a complete script for an empty folder. It installs the client, sends one request and prints the answer.

```bash tab="cURL"
# Needs curl. Create the key at https://console.munito.ai/keys.
export MUNITO_API_KEY="munitoai_..."

curl -sS --fail-with-body https://api.munito.ai/inference/v1/chat/completions \
  -H "Authorization: Bearer $MUNITO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "qwen/qwen3.8-27b",
    "messages": [{"role": "user", "content": "Say hello in one sentence."}],
    "max_tokens": 1024
  }'
```

```bash tab="Python"
# Needs Python 3.9 or later. Make a project and install the OpenAI client.
mkdir munito-quickstart && cd munito-quickstart
python3 -m venv .venv && . .venv/bin/activate
pip install --quiet openai

# Create the key at https://console.munito.ai/keys.
export MUNITO_API_KEY="munitoai_..."

cat > main.py <<'EOF'
import os

from openai import OpenAI

client = OpenAI(
    base_url="https://api.munito.ai/inference/v1",
    api_key=os.environ["MUNITO_API_KEY"],
)
response = client.chat.completions.create(
    model="qwen/qwen3.8-27b",
    messages=[{"role": "user", "content": "Say hello in one sentence."}],
    max_tokens=1024,
)
print(response.choices[0].message.content)
EOF

python main.py
```

```bash tab="TypeScript"
# Needs Node.js 22.18 or later, which runs TypeScript files. Make a project and install the OpenAI client.
mkdir munito-quickstart && cd munito-quickstart
npm init -y --silent >/dev/null && npm pkg set type=module
npm install --silent openai

# Create the key at https://console.munito.ai/keys.
export MUNITO_API_KEY="munitoai_..."

cat > main.ts <<'EOF'
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://api.munito.ai/inference/v1",
  apiKey: process.env.MUNITO_API_KEY,
});
const response = await client.chat.completions.create({
  model: "qwen/qwen3.8-27b",
  messages: [{ role: "user", content: "Say hello in one sentence." }],
  max_tokens: 1024,
});
console.log(response.choices[0].message.content);
EOF

node main.ts
```

### Expected output [#expected-output]

The script prints the answer of the model, such as `Hello! It is nice to meet you.` The cURL script prints the JSON body, with the answer in `choices[0].message.content`.

## Anthropic Messages API [#anthropic-messages-api]

The same key works with the Anthropic API. The Anthropic client adds `/v1/messages` itself, so its base URL ends with `/inference`.

```bash tab="cURL"
# Needs curl. Create the key at https://console.munito.ai/keys.
export MUNITO_API_KEY="munitoai_..."

curl -sS --fail-with-body https://api.munito.ai/inference/v1/messages \
  -H "X-API-Key: $MUNITO_API_KEY" \
  -H "anthropic-version: 2023-06-01" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "qwen/qwen3.8-27b",
    "messages": [{"role": "user", "content": "Say hello in one sentence."}],
    "max_tokens": 1024
  }'
```

```bash tab="Python"
# Needs Python 3.9 or later. Make a project and install the Anthropic client.
mkdir munito-quickstart && cd munito-quickstart
python3 -m venv .venv && . .venv/bin/activate
pip install --quiet anthropic

# Create the key at https://console.munito.ai/keys.
export MUNITO_API_KEY="munitoai_..."

cat > main.py <<'EOF'
import os

from anthropic import Anthropic

client = Anthropic(
    base_url="https://api.munito.ai/inference",
    api_key=os.environ["MUNITO_API_KEY"],
)
response = client.messages.create(
    model="qwen/qwen3.8-27b",
    messages=[{"role": "user", "content": "Say hello in one sentence."}],
    max_tokens=1024,
)
print("".join(block.text for block in response.content if block.type == "text"))
EOF

python main.py
```

```bash tab="TypeScript"
# Needs Node.js 22.18 or later, which runs TypeScript files. Make a project and install the Anthropic client.
mkdir munito-quickstart && cd munito-quickstart
npm init -y --silent >/dev/null && npm pkg set type=module
npm install --silent @anthropic-ai/sdk

# Create the key at https://console.munito.ai/keys.
export MUNITO_API_KEY="munitoai_..."

cat > main.ts <<'EOF'
import Anthropic from "@anthropic-ai/sdk";

const client = new Anthropic({
  baseURL: "https://api.munito.ai/inference",
  apiKey: process.env.MUNITO_API_KEY,
});
const response = await client.messages.create({
  model: "qwen/qwen3.8-27b",
  messages: [{ role: "user", content: "Say hello in one sentence." }],
  max_tokens: 1024,
});
console.log(response.content.map((block) => (block.type === "text" ? block.text : "")).join(""));
EOF

node main.ts
```

### Expected output [#expected-output-1]

The script prints the answer of the model. The cURL script prints the JSON body, with the answer in the `text` block of `content`.

## Next [#next]

- [Models](https://docs.munito.ai/models): choose a model, and put its ID in place of `qwen/qwen3.8-27b`.
- [Compatibility](https://docs.munito.ai/compatibility): move an app from the OpenAI or Anthropic SDK.
- [Regions](https://docs.munito.ai/regions): keep processing in the EU or the US.
- [Errors](https://docs.munito.ai/errors) and [rate limits](https://docs.munito.ai/rate-limits): what to do when a request fails.
