cURL

Call 000 Labs from the command line.

Chat completion
curl https://api.000labs.xyz/v1/chat/completions \
  -H "Authorization: Bearer $(printenv 000_LABS_API_KEY)" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "openai/gpt-4o-mini",
    "messages": [
      {"role": "user", "content": "What is the meaning of life?"}
    ]
  }'

Streaming

Streaming
curl https://api.000labs.xyz/v1/chat/completions \
  -H "Authorization: Bearer $(printenv 000_LABS_API_KEY)" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "openai/gpt-4o-mini",
    "messages": [
      {"role": "user", "content": "What is the meaning of life?"}
    ],
    "stream": true
  }' --no-buffer

List models

Models
curl https://api.000labs.xyz/v1/models -H "Authorization: Bearer $(printenv 000_LABS_API_KEY)"