OpenAI compatible

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. 1

    Create a key

    Sign in, create a key, and copy it immediately. The full key is shown only once.

  2. 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. 3

    Make a request

    Point an OpenAI-compatible client at the Pokee base URL and use model pokee-isaac.

curl
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:

HTTP header
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

MethodPathPurposeAuth
GET/v1/modelsList available modelsRequired
POST/v1/chat/completionsCreate a completionRequired
GET/v1/chat/completions/{id}Poll a background completionRequired
GET/v1/chat/completions/{id}?stream=trueResume a background streamRequired
POST/v1/chat/completions/{id}/cancelCancel a background completionRequired
GET/v1/healthCheck gateway healthPublic

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].

Python
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.

Create a background completion
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, resume, and cancel
# 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, and cancelled.
  • Background stream chunks include a stable response ID and sequence_number. SSE id: values use the same sequence.
  • starting_after takes precedence over the Last-Event-ID header.
  • 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.

HTTP header
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 response
{
  "error": {
    "message": "Insufficient credits",
    "type": "insufficient_quota",
    "code": "insufficient_credits"
  }
}
400invalid_request_errorInvalid JSON, parameters, model, or token limit
401invalid_api_keyMissing or invalid API key
402insufficient_creditsAvailable developer credits cannot cover the request hold
403key_revokedThe API key has been revoked
404response_not_foundUnknown, expired, or inaccessible background response
409idempotency_key_replayedA synchronous request was already processed
413payload_too_largeRequest body exceeds the gateway limit
422idempotency_key_reusedAn idempotency key was reused with another body
429rate_limit_exceededA request, concurrency, or token limit was reached
502/503api_errorInference or billing infrastructure is temporarily unavailable

On 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.

Input tokens$0.15 / 1M tokens
Output tokens$1.50 / 1M tokens
  • 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.

Create an API key