Go
OpenAI-compatible API
Go is a standard OpenAI-shaped API at https://haidercode.ai/v1 — any existing client works.
Base URL and endpoints
Base URL: https://haidercode.ai/v1. Authenticate with an API key:
| Endpoint | What it does |
|---|---|
GET /v1/models | list available models |
POST /v1/chat/completions | chat completions, streaming or not |
Point the harness at it
haider provider configure go \ --kind openai-compatible \ --origin https://haidercode.ai/v1 \ --api-key hk-…
curl
curl https://haidercode.ai/v1/chat/completions \
-H "Authorization: Bearer hk-…" \
-H "Content-Type: application/json" \
-d '{"model":"deepseek-v4-flash","messages":[{"role":"user","content":"hi"}]}'Streaming
Set "stream": true for server-sent events. The stream includes a usage frame, so token counts are visible to any client — no guessing at cost.
Errors
Errors are OpenAI-shaped JSON, so existing clients handle them unchanged:
| Status | Meaning |
|---|---|
| 401 | missing, malformed, or revoked key |
402 insufficient_quota | weekly allowance and usage-credits both exhausted — subscribe or top up |
| 503 | upstream model provider not configured on the deployment |