Contents

Docs

Any OpenAI or Anthropic client works. Point it at your region and send the request you already send.

Region
  1. 01
    Create a key

    Create an account, add credits, and create a key. The key is shown once. Keep it server-side.

  2. 02
    Send a request

    Set the base URL to your region and the key in the Authorization header.

  3. 03
    Read the response

    The shape is the OpenAI chat completion. Usage is on the response and on the usage page.

Send a request

curl https://au.api.safeailabs.ai/v1/chat/completions \
  -H "Authorization: Bearer $SAFE_AI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "deepseek-flash",
    "messages": [{"role": "user", "content": "Hello"}]
  }'

Read the response

Every response carries x-request-id and x-region headers. The region header names where the request ran.

200 · x-request-id: req_01J8Z4 · x-region: au-syd
{
  "id": "req_01J8Z4",
  "object": "chat.completion",
  "created": 1789516920,
  "model": "deepseek-flash",
  "choices": [
    {
      "index": 0,
      "message": { "role": "assistant", "content": "Hello. How can I help?" },
      "finish_reason": "stop"
    }
  ],
  "usage": { "prompt_tokens": 9, "completion_tokens": 8, "total_tokens": 17 }
}