Background texture

Quickstart

Get started with ModelMax in under 5 minutes. You'll send your first chat completion and stream a response.

1. Get your API key

Sign in to the ModelMax Dashboard with your Google account, then create an API key under Settings → API Keys.

2. Send a chat completion

curl -X POST https://api.modelmax.io/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $MODELMAX_API_KEY" \
  -d '{
    "model": "gemini-3-flash-preview",
    "messages": [
      { "role": "user", "content": "Explain quantum computing in one sentence." }
    ]
  }'
from openai import OpenAI

client = OpenAI(
    api_key="your-api-key",
    base_url="https://api.modelmax.io/v1",
)

response = client.chat.completions.create(
    model="gemini-3-flash-preview",
    messages=[
        {"role": "user", "content": "Explain quantum computing in one sentence."}
    ],
)

print(response.choices[0].message.content)
import OpenAI from "openai";

const client = new OpenAI({
  apiKey: "your-api-key",
  baseURL: "https://api.modelmax.io/v1",
});

const response = await client.chat.completions.create({
  model: "gemini-3-flash-preview",
  messages: [
    { role: "user", content: "Explain quantum computing in one sentence." },
  ],
});

console.log(response.choices[0].message.content);

3. Stream the response

Add "stream": true to receive tokens as they're generated via Server-Sent Events.

curl -X POST https://api.modelmax.io/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $MODELMAX_API_KEY" \
  -d '{
    "model": "gemini-3-flash-preview",
    "messages": [
      { "role": "user", "content": "Write a haiku about APIs." }
    ],
    "stream": true
  }'
stream = client.chat.completions.create(
    model="gemini-3-flash-preview",
    messages=[{"role": "user", "content": "Write a haiku about APIs."}],
    stream=True,
)

for chunk in stream:
    content = chunk.choices[0].delta.content
    if content:
        print(content, end="", flush=True)
const stream = await client.chat.completions.create({
  model: "gemini-3-flash-preview",
  messages: [{ role: "user", content: "Write a haiku about APIs." }],
  stream: true,
});

for await (const chunk of stream) {
  const content = chunk.choices[0]?.delta?.content;
  if (content) process.stdout.write(content);
}

4. Generate a video

Video generation uses the async queue API. Submit a task, poll for completion, then download.

# Submit
curl -X POST https://api.modelmax.io/v1/queue/veo-3 \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $MODELMAX_API_KEY" \
  -d '{ "prompt": "A cat riding a skateboard through a neon-lit city" }'

# Response → { "request_id": "...", "status_url": "...", "response_url": "..." }

# Poll status
curl https://api.modelmax.io/v1/queue/veo-3/requests/{request_id}/status \
  -H "Authorization: Bearer $MODELMAX_API_KEY"

# When COMPLETED, get result
curl https://api.modelmax.io/v1/queue/veo-3/requests/{request_id} \
  -H "Authorization: Bearer $MODELMAX_API_KEY"

See the full Video generation guide for the complete workflow.

Next steps