REST & cURL

Copy requests for Chat Completions, Responses, and Anthropic Messages.

These cURL examples use Bash or Zsh. Set ZOKASTA_API_KEY before you run them. For PowerShell examples, start with the quickstart.

Chat completions

POST /v1/chat/completions
curl -sS https://api.zokasta.com/v1/chat/completions \
  -H "Authorization: Bearer $ZOKASTA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"gpt-5.6-sol","messages":[{"role":"user","content":"Say hello in one sentence."}],"max_completion_tokens":64}'

List models

GET /v1/models
curl -sS https://api.zokasta.com/v1/models \
  -H "Authorization: Bearer $ZOKASTA_API_KEY"

Responses API

POST /v1/responses
curl -sS https://api.zokasta.com/v1/responses \
  -H "Authorization: Bearer $ZOKASTA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"gpt-5.6-sol","input":"Say hello in one sentence.","max_output_tokens":64}'

Anthropic Messages

Claude models require Claude Code. The following shows the Messages request body sent by an eligible client.

Messages request body
{
  "model": "claude-sonnet-4-6",
  "messages": [
    {
      "role": "user",
      "content": "Say hello in one sentence."
    }
  ],
  "max_tokens": 64
}