Quickstart

Create a key, list your models, and send a test request.

  1. Create an API key

    Create a key under API keys and copy it when it appears. Replace the placeholder in the command for your shell.

    Bash or Zsh
    export ZOKASTA_API_KEY="sk_live_..."
    PowerShell
    $env:ZOKASTA_API_KEY = "sk_live_..."
  2. Check which models your key can use

    The response contains the available model IDs for this key. Use an OpenAI model ID for the chat request below.

    Bash or Zsh
    curl -sS https://api.zokasta.com/v1/models/openai \
      -H "Authorization: Bearer $ZOKASTA_API_KEY"
    PowerShell
    $headers = @{ Authorization = "Bearer $env:ZOKASTA_API_KEY" }
    Invoke-RestMethod -Uri "https://api.zokasta.com/v1/models/openai" -Headers $headers
  3. Send a chat request

    Replace the example model if your key uses a different one. Look for the reply in choices[0].message.content and token counts in usage.

    Bash or Zsh
    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}'
    PowerShell
    $headers = @{ Authorization = "Bearer $env:ZOKASTA_API_KEY" }
    $body = '{"model":"gpt-5.6-sol","messages":[{"role":"user","content":"Say hello in one sentence."}],"max_completion_tokens":64}'
    Invoke-RestMethod -Method Post -Uri "https://api.zokasta.com/v1/chat/completions" -Headers $headers -ContentType 'application/json' -Body $body