Skip to content

Quickstart

Crafted AI is a drop-in gateway for OpenAI-compatible chat completions. Point the OpenAI SDK at our base URL, swap the API key for a cai_… gateway key, and you get unified usage tracking, BYOK provider keys, and per-key rate limits — without touching the rest of your code.

Sign up at app.craftedai.co. A personal organisation is provisioned for you on first login.

Open Credentials → Provider keys in the control panel and paste an OpenAI or Anthropic API key. Provider keys are encrypted at rest with the gateway’s MODEL_CONFIG_ENCRYPTION_KEY and are never returned by the API after they are stored.

Open Credentials → Gateway keys → New key. Copy the cai_… value — it is shown exactly once. Optionally set a requests-per-minute (RPM) cap and a daily token cap for the key. Treat the value like any other secret.

Set two environment variables:

Terminal window
export CRAFTED_AI_KEY="cai_..."
export CRAFTED_AI_BASE_URL="https://api-staging.craftedai.co/v1"
Terminal window
curl "$CRAFTED_AI_BASE_URL/chat/completions" \
-H "Authorization: Bearer $CRAFTED_AI_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-4o-mini",
"messages": [
{ "role": "user", "content": "Say hello in one short sentence." }
]
}'

Open app.craftedai.co/usage to see the call appear with token counts and cost, broken down by gateway key and model.

Open the Marketplace, install General SMB, and resend the same request from step 5. You now have a working Bot. The request looks identical to what you sent before — same model, same messages — but the gateway now prepends a system prompt, injects scheduling and support tools, and applies skill instructions automatically. No code change.

This is the Bot platform in one action: install a pack, bind the resulting bot to your gateway key, and every subsequent request through that key gets the full configuration applied.

Read Concepts to understand the four entities — Bots, Skills, MCPs, and Industry Packs — and how they compose at request time.

  • Drop-in OpenAI compatibility — works with the official OpenAI SDKs and any OpenAI-compatible client.
  • Anthropic translation — request a Claude model and the gateway adapts the request and response on the fly.
  • Usage tracking — every call is recorded with prompt/completion tokens, cost, and latency, scoped to your organisation, gateway key, and model.
  • Streaming — set stream: true and the gateway forwards Server-Sent Events with stream_options.include_usage already injected so the final chunk carries token counts.
  • Bot platform — bind a Bot to your gateway key and every request gets the bot’s system prompt, skills, and plugins applied automatically.
  • WhatsApp — configure a Twilio sender and bind a Bot so inbound WhatsApp messages get the same bot treatment as gateway API calls.

Next: read the Gateway API reference for the full request and error envelope, configure WhatsApp, connect MCP integrations, or jump to Credentials for rotation and rate-limit guidance.