xKiro is OpenAI & Anthropic compatible — use the official SDK, just change base_url.
Step 1 — Get your API key
Step 2 — Install SDK
Step 3 — Make your first call
Run in PlaygroundStep 4 — Expected response
The OpenAI SDK sends your key as Authorization: Bearer. Point base_url at xKiro and your existing OpenAI code just works.
Never expose your API key in client-side code or public repositories. Use environment variables or a server-side proxy.
xKiro supports 120+ models from leading providers. Pass the model ID in your request. The model ID is case-sensitive.
| Model | Provider | Context | Input / 1M | Output / 1M | ID |
|---|---|---|---|---|---|
| Claude Sonnet 4.5 | Anthropic | 200K | $3.00 | $15.00 | |
| GPT-4o | OpenAI | 128K | $2.50 | $10.00 | |
| Gemini 2.0 Flash | 1M | $0.10 | $0.40 | ||
| Llama 3.3 70B | Meta | 128K | $0.59 | $0.79 | |
| DeepSeek R1 | DeepSeek | 64K | $0.55 | $2.19 |
| Parameter | Type | Default | Description |
|---|---|---|---|
modelrequired | string | — | Model ID to use (case-sensitive). |
messagesrequired | array | — | Array of message objects with role and content. |
temperature | number | 1 | Randomness — 0 is deterministic, 2 is very random. |
max_tokens | integer | null | Maximum tokens in the response. Null = model default. |
top_p | number | 1 | Nucleus sampling: consider tokens with top_p probability. |
stream | boolean | false | Stream tokens via SSE as they are generated. |
stop | string|array | null | Up to 4 stop sequences. Generation halts when hit. |
Set stream: true to receive tokens as they are generated instead of waiting for the full response.
| Status | Code | Meaning | How to handle |
|---|---|---|---|
| 400 | invalid_request | Malformed JSON or missing required field | Fix request payload before retrying |
| 401 | unauthorized | Missing or invalid API key | Check Authorization header format |
| 403 | forbidden | Request IP is not in the key's allowlist | Add your IP to the key's allowlist, or remove the restriction |
| 404 | model_not_found | Model ID does not exist or is unavailable | Verify model ID from /dashboard/models |
| 429 | rate_limit_exceeded | Too many requests or tokens | Back off exponentially; check Retry-After |
| 500 | internal_error | Unexpected server-side error | Retry once with backoff; report if persistent |
| 503 | service_unavailable | Provider temporarily unavailable | Retry with exponential backoff |
Rate limits apply per API key. When you exceed one, the request is rejected with HTTP 429 — nothing is charged.
A 429 response includes these headers:
Retry-Afterseconds to wait before retryingX-RateLimit-Scopewhich limit was hitX-RateLimit-Windowthe limit's time window