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 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 background completions that can be polled, resumed, or cancelled.
The base URL for this environment is https://api.pokee.ai/v1. The API 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.
Request bodies over 16 MiB require SSE. Set stream: true and send Accept: text/event-stream. See the long-context requirements before sending large prompts.
curl https://api.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."}
]
}'By using api.pokee.ai, you agree to Pokee's Terms of Service and Privacy Policy.
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 stop working shortly after revocation.
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 API health | Public |
| GET | /v1/health?deep=1 | Check API and model availability | Required |
Chat completions
Pokee uses the OpenAI Chat Completions request and response format, so you can use the official OpenAI SDK or any compatible client. Requests are sent to Pokee, not OpenAI, through the configured base_url and use the pokee-isaac model.
Send an OpenAI-compatible chat-completion body to POST /v1/chat/completions. The fields below are supported along with other compatible chat-completion options.
modelrequired
Use pokee-isaac. If omitted, the API 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. Both the default and the maximum are 60,000 output tokens. If both are present, their values must match.
Streaming
Set stream: true to receive standard OpenAI-compatible chat-completion chunks over Server-Sent Events. Pokee includes a final chunk with token usage, and the stream ends with data: [DONE].
from openai import OpenAI
client = OpenAI(
api_key="pk-...",
base_url="https://api.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)curl -N https://api.pokee.ai/v1/chat/completions \
-H "Authorization: Bearer $POKEE_API_KEY" \
-H "Content-Type: application/json" \
-H "Accept: text/event-stream" \
--data-binary @large-request.jsonA normal streamed request ends if the caller disconnects. Use background mode when the result must remain available after a disconnect.
Long context
Pokee-Isaac accepts prompts up to roughly 10 million tokens, with a request body limit of 45 MiB. A prompt that large can take several minutes to serve — around seven minutes at 10 million tokens.
SSE is required above 16 MiBrequired
Set stream: true and send Accept: text/event-stream. The gateway rejects a large request without explicit SSE negotiation before reserving credits. During upload and model prefill, SSE comment heartbeats keep intermediary connections alive.
Set a generous client timeout
Many HTTP clients default to 30 or 60 seconds. Allow at least 10 minutes for multi-million-token prompts, or the client will hang up on a request that is still working.
Above 16 MiB
Idempotency-Key and background are not available for request bodies over 16 MiB. Large requests use the live SSE passthrough only.
Token counts are reported in the usage object as measured by the model, and are what you are billed on. Bytes are a poor proxy for tokens — the same 1 MB of text can be anywhere from 140,000 to 700,000 tokens depending on its content — so size your requests against reported usage rather than body size.
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.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.pokee.ai/v1/chat/completions/chatcmpl-... \
-H "Authorization: Bearer $POKEE_API_KEY"
# Resume a stream after sequence 42
curl "https://api.pokee.ai/v1/chat/completions/chatcmpl-...?stream=true&starting_after=42" \
-H "Authorization: Bearer $POKEE_API_KEY"
# Cancel
curl -X POST https://api.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.
- Only a background completion created with
stream: truecan be resumed with?stream=true; other responses return400 not_streamable. Polling works for both.
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.
Rate limits
Limits apply per developer account across all of its API keys. Every account gets 500 requests per minute and 20 million tokens per minute. Purchasing any credit package raises concurrent requests from 10 to 25.
| Account | Requests/min | Tokens/min | Concurrent |
|---|---|---|---|
| Free | 500 | 20,000,000 | 10 |
| Paid | 500 | 20,000,000 | 25 |
Limits apply per developer account across all API keys. Any credit-package purchase unlocks paid concurrency; package size does not change the limit.
Errors
Error responses use one consistent OpenAI-compatible envelope:
{
"error": {
"message": "Insufficient available credits: 143 available, 156 required (156 reserved by in-flight requests)",
"type": "insufficient_quota",
"code": "insufficient_credits"
}
}invalid_request_errorInvalid JSON, parameters, model, or token limitlarge_request_requires_sseA request over 16 MiB did not negotiate SSEinvalid_api_keyMissing or invalid API keyinsufficient_creditsAvailable credits after active reservations are insufficientkey_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 API limitidempotency_key_reusedAn idempotency key was reused with another bodyrate_limit_exceededA request, concurrency, or token limit was reachedupstream_errorThe model service returned an errorservice_unavailableThe API is temporarily unavailable400 responses share the invalid_request_error type; the code field, when present, narrows the cause (for example model_not_found or invalid_max_tokens).
On 429, wait for the number of seconds in the Retry-After response header before retrying. See Rate limits for the current policy.
Pricing and limits
Developer credits
One credit equals $0.01. New developer accounts include 300 free credits. Developer API credits are separate from PokeeClaw subscriptions and consumer balances.
Request limits
Every account gets 500 requests and 20M tokens per minute. Any credit purchase raises concurrency from 10 to 25. A limited request returns 429 with Retry-After.
- Usage is billed in whole credits. A non-zero charge below one credit rounds up to one credit; a request with no measured token usage costs zero credits.
- The request body limit is 45 MiB, which is roughly 10 million input tokens. Output defaults to 60,000 tokens and is capped at the same figure. Bodies over 16 MiB require
stream: trueandAccept: text/event-stream. - Available credits equal settled balance minus active reservations. The Billing and Dashboard pages show reserved and total credits when requests are in flight.
- 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 available for poll/resume/cancel, then deleted approximately 10 minutes after completion.
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.