Skip to content
CraftiestCraftiest

Docs

Everything below is the actual gateway — the same code path the playground uses.

  1. 1

    Get a key

    Start as a guest and you already have one working from the playground. For the API, create a named key from the dashboard — it's shown once.

    Create a key
  2. 2

    Call the gateway

    POST to /v1/chat/completions with an OpenAI-shaped body. Point an existing OpenAI SDK at our baseURL and nothing else changes.

    Browse models
  3. 3

    Add fallback

    Pass fallbacks: ["model-slug", ...] and the gateway walks the chain on a retryable failure, billing whichever model actually served it.

    See the reference

Quickstart

curl https://api.craftiest.xyz/v1/chat/completions \
  -H "Authorization: Bearer $CRAFT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "anthropic/claude-opus-5",
    "messages": [{ "role": "user", "content": "Summarize this quarter." }]
  }'

Endpoints

  • POST/v1/chat/completionsOpenAI-compatible. Streaming (SSE) or a single JSON response.
  • GET/v1/modelsThe routable catalog with credit pricing and a `routable` flag per model.
  • GET/v1/creditsBalance, reserved, and spendable for the calling key's org.

How pricing works

Every request holds credits against its worst case before it runs — an unspecified max_tokens is capped at 8,192 for both the hold and the upstream call, so the reservation is a real ceiling. On completion you’re charged exactly what was used and the rest is released. See Pricing for current rates.

Ready to call it for real?

Start building