curl quickstart

Raw HTTP examples for every endpoint. Drop these into a shell, CI step, or k6 load test.

Chat completions

curl https://firemission.us/v1/chat/completions \
  -H "Authorization: Bearer fm_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-4o-mini",
    "messages": [{"role": "user", "content": "Hello"}]
  }'

Chat completions — streaming

The -N flag disables curl's buffering so SSE events flush as they arrive.

curl -N https://firemission.us/v1/chat/completions \
  -H "Authorization: Bearer fm_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-4o-mini",
    "stream": true,
    "messages": [{"role": "user", "content": "Stream a haiku"}]
  }'

Messages (Anthropic surface)

curl https://firemission.us/v1/messages \
  -H "x-api-key: fm_live_..." \
  -H "anthropic-version: 2023-06-01" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "claude-3-5-sonnet-latest",
    "max_tokens": 256,
    "messages": [{"role": "user", "content": "Hello"}]
  }'

Embeddings

curl https://firemission.us/v1/embeddings \
  -H "Authorization: Bearer fm_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "model": "text-embedding-3-small",
    "input": "the quick brown fox"
  }'

List models

curl https://firemission.us/v1/models \
  -H "Authorization: Bearer fm_live_..."