Quickstart

Get a key, point any OpenAI SDK at the CompanyFabric base URL, and make your first metered call.

1. Get an API key

Create a free account and copy your key from the dashboard — it is shown once, so store it as an environment variable. Free starter credits are included; no card is required to try the API.

export COMPANYFABRIC_API_KEY="sk-ct-…"

2. Make your first call

The API is OpenAI-compatible: any OpenAI SDK works by changing the base URL and key. One key covers every model in the library.

curl https://api.companyfabric.com/v1/chat/completions \
  -H "Authorization: Bearer $COMPANYFABRIC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "companyfabric/auto",
    "messages": [{ "role": "user", "content": "Say hello." }]
  }'

3. Read the exact cost

Every response carries exact metered usage — the same number the dashboard and your invoice show. On streamed responses the final chunk before [DONE] carries the usage object with cost_usd.

Next steps

  • Pick a model from the library (/models) or stay on companyfabric/auto.
  • Set a budget cap on your key in the dashboard so a runaway loop stops at the cap.
  • Generating video, image, or audio? Use the async jobs API (/docs/jobs).