Pokee-Isaac API
Add Pokee's reasoning model to an existing OpenAI client, or call the HTTP API directly. The same API key works for synchronous, streaming, and durable background completions.
Overview
One API key
Authenticate every request with a show-once key created in the developer console.
Stream normally
Use standard OpenAI chat-completion streaming and SDK response objects.
Resume long work
Run durable background completions that can be polled, resumed, or cancelled.
The base URL for this environment is https://api-dev.pokee.ai/v1. The gateway serves only the documented /v1 endpoints; unknown routes return an OpenAI-shaped 404 error.
Quickstart
- 1
Create a key
Sign in, create a key, and copy it immediately. The full key is shown only once.
- 2
Store it securely
Put the key in a server-side secret or environment variable. Do not ship it in browser or mobile code.
- 3
Make a request
Point an OpenAI-compatible client at the Pokee base URL and use model
pokee-isaac.
curl https://api-dev.pokee.ai/v1/chat/completions \
-H "Authorization: Bearer $POKEE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "pokee-isaac",
"messages": [
{"role": "user", "content": "Explain why the sky is blue."}
]
}'Authentication
Send your Pokee key as a Bearer token on every API request:
Authorization: Bearer pk-...Keep API keys server-side
A Pokee key grants access to your developer balance. Use a backend or trusted runtime for calls from web and mobile products. Revoked keys begin failing shortly after revocation as the authentication cache expires.
Endpoints
| Method | Path | Purpose | Auth |
|---|---|---|---|
| GET | /v1/models | List available models | Required |
| POST | /v1/chat/completions | Create a completion | Required |
| GET | /v1/chat/completions/{id} | Poll a background completion | Required |
| GET | /v1/chat/completions/{id}?stream=true | Resume a background stream | Required |
| POST | /v1/chat/completions/{id}/cancel | Cancel a background completion | Required |
| GET | /v1/health | Check gateway health | Public |
Chat completions
Send an OpenAI-compatible chat-completion body to POST /v1/chat/completions. The gateway validates the fields below and forwards other supported chat-completion options to Pokee-Isaac.
modelrequired
Use pokee-isaac. If omitted, the gateway selects Pokee-Isaac; another model name returns model_not_found.
messagesrequired
An array of chat messages. The request is rejected when this field is missing.
stream
Set to true for an SSE stream of chat-completion chunks.
background
Pokee extension. Set to true to make the completion pollable, resumable, and cancellable.
max_tokens / max_completion_tokens
Either spelling is accepted. The default is 4,096 output tokens and the maximum is 16,384. If both are present, their values must match.
Streaming
Set stream: true to receive standard chat-completion chunks over Server-Sent Events. Pokee requests a final usage chunk for metering, and the stream ends with data: [DONE].
from openai import OpenAI
client = OpenAI(
api_key="pk-...",
base_url="https://api-dev.pokee.ai/v1",
)
stream = client.chat.completions.create(
model="pokee-isaac",
messages=[{"role": "user", "content": "Write a short launch plan."}],
stream=True,
)
for chunk in stream:
content = chunk.choices[0].delta.content if chunk.choices else None
if content:
print(content, end="", flush=True)A normal streamed request is tied to the client connection. If the caller disconnects, the gateway stops the upstream generation. Use background mode when the result must survive a disconnect.
Background mode
Add background: true to a chat-completion request. This is a Pokee extension to Chat Completions, not an implementation of the OpenAI Responses API.
curl https://api-dev.pokee.ai/v1/chat/completions \
-H "Authorization: Bearer $POKEE_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: report-2026-07-16" \
-d '{
"model": "pokee-isaac",
"messages": [
{"role": "user", "content": "Produce a detailed market analysis."}
],
"background": true
}'Create
The response receives a chatcmpl-… resource ID.
Poll
GET the resource to read its current status or final result.
Resume
Reconnect after a sequence number or with Last-Event-ID.
Cancel
Cancellation is idempotent and returns the current resource.
# Poll
curl https://api-dev.pokee.ai/v1/chat/completions/chatcmpl-... \
-H "Authorization: Bearer $POKEE_API_KEY"
# Resume a stream after sequence 42
curl "https://api-dev.pokee.ai/v1/chat/completions/chatcmpl-...?stream=true&starting_after=42" \
-H "Authorization: Bearer $POKEE_API_KEY"
# Cancel
curl -X POST https://api-dev.pokee.ai/v1/chat/completions/chatcmpl-.../cancel \
-H "Authorization: Bearer $POKEE_API_KEY"- Status values are
in_progress,completed,failed, andcancelled. - Background stream chunks include a stable response ID and
sequence_number. SSEid:values use the same sequence. starting_aftertakes precedence over theLast-Event-IDheader.- A background generation can run for up to 10 minutes. Terminal resources are retained for approximately 10 minutes, then return 404.
Idempotency
Send an Idempotency-Key header when retrying a request must not start a second generation or create a second charge. Use a unique printable value of at most 200 characters for each logical operation.
Idempotency-Key: customer-report-2026-07-16- Reusing a key with a different request body returns
422 idempotency_key_reused. - A duplicate synchronous request that cannot replay its response returns
409 idempotency_key_replayed. - A duplicate background request may return the original background resource while it remains available.
Errors
Error responses use one consistent OpenAI-compatible envelope:
{
"error": {
"message": "Insufficient credits",
"type": "insufficient_quota",
"code": "insufficient_credits"
}
}invalid_request_errorInvalid JSON, parameters, model, or token limitinvalid_api_keyMissing or invalid API keyinsufficient_creditsAvailable developer credits cannot cover the request holdkey_revokedThe API key has been revokedresponse_not_foundUnknown, expired, or inaccessible background responseidempotency_key_replayedA synchronous request was already processedpayload_too_largeRequest body exceeds the gateway limitidempotency_key_reusedAn idempotency key was reused with another bodyrate_limit_exceededA request, concurrency, or token limit was reachedapi_errorInference or billing infrastructure is temporarily unavailableOn 429, wait for the number of seconds in the Retry-After response header before retrying.
Pricing and limits
Developer credits
One credit equals $0.01. Developer API credits are separate from PokeeClaw subscriptions and consumer balances.
Request limits
Requests are limited by rate, concurrency, and token usage. Higher credit packages can carry higher limits. A limited request returns 429 with Retry-After.
- A positive fractional request cost is rounded up once to the next whole credit. A request with zero measured usage costs zero credits.
- The gateway places a temporary hold based on request size and the selected output limit, then releases it and charges actual measured usage at settlement.
- The request body limit is 256 KiB. Output defaults to 4,096 tokens and is capped at 16,384 tokens.
- View per-request input tokens, output tokens, credits, model, and API key on the Usage page.
Data & privacy
Pokee does not persist inference prompts in its own application storage. The inference service emits operational logs containing only a ~120-character truncated preview of each message (not full prompt bodies); these logs are retained 1 day by our infrastructure provider and then automatically deleted. Separately, the provider stores the raw request payload encrypted at rest for up to 7 days for operational purposes before automatic deletion. No prompt data is used for training.
- What we do retain: request metadata only — token counts, timestamps, model, credits, API key id, and the caller IP for rate limiting. Never message content.
- Background responses are held transiently to serve poll/resume/cancel, then deleted after a short retention window (~10 minutes past completion).
- Sub-processors: Cloudflare (API gateway, account and usage storage), Modal (model inference), Stripe (payments), and Clerk (authentication).
Full details are in our Privacy Policy and Terms of Service.
Ready to make your first request?
Create a key, store it once, and use any OpenAI-compatible client.