deeprelayDocs
CH·GGuides

Getting Started

Create an account, add credit, and make your first OpenAI-compatible inference call on deeprelay in minutes.

deeprelay is an OpenAI-compatible inference API. If you already use the OpenAI SDK, you change two settings and keep your code. This page takes you from nothing to a first response in four steps: get a key, set it, read the model catalog, send a chat completion. Each step is one command.

Already know what you want? Jump to the Serverless Inference guide or the deeprelay CLI reference.

1. Get an API key

Private beta. Accounts are invite-only for now. If you cannot sign in, ask the team for an invite — everything below works the moment you have one.

Sign in to the dashboard and open Cloud → API keys. Create a key; it is shown once and starts with deeprelay_live_. Copy it somewhere safe.

If you would rather stay in the terminal, install the CLI (see Install) and run deeprelay login. It opens the same sign-in in your browser and stores a key in ~/.config/deeprelay/credentials.json for you.

2. Set the key in your shell

Every example on this page reads the key from the environment, so it never ends up in source control:

export DEEPRELAY_API_KEY=deeprelay_live_...

All requests go to one base URL and carry the key as a bearer token. The API is account-scoped: there is no anonymous access, so a missing or wrong key is a 401.

Base URLhttps://api.deeprelay.ai/v1
AuthAuthorization: Bearer $DEEPRELAY_API_KEY

3. Read the model catalog

Listing models is the safest way to prove the key works: it is a read, it generates nothing, and it bills nothing.

curl https://api.deeprelay.ai/v1/models \
  -H "Authorization: Bearer $DEEPRELAY_API_KEY"

The response is an OpenAI-shaped list, object: "list" with a data array. Trimmed to one entry and the fields you need first:

{
  "object": "list",
  "data": [
    {
      "id": "deeprelay/deepseek-v4-flash",
      "object": "model",
      "name": "Qwen 2.5 7B Instruct",
      "author": "Qwen",
      "modality": "chat",
      "context_length": 8192,
      "pricing": {
        "currency": "usd",
        "input_per_1m_tokens_cents": 7,
        "output_per_1m_tokens_cents": 28
      },
      "status": "active"
    }
  ]
}

Two things to know about this list:

  • It is live, not hand-maintained. What it shows is what is warm and
callable right now — see The serverless catalog is live.
  • GET /v1/models?modality=chat filters it, and GET /v1/models/{id}
returns one record. A 403 means the key is valid but lacks the serverless:read scope.

4. Send your first chat completion

Take an id from the catalog and send it a message. This is the OpenAI chat completions request, unchanged:

curl https://api.deeprelay.ai/v1/chat/completions \
  -H "Authorization: Bearer $DEEPRELAY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"deeprelay/deepseek-v4-flash","messages":[{"role":"user","content":"hi"}]}'

This one costs a fraction of a cent. Add "stream": true for token-by-token server-sent events.

Using the OpenAI SDK? Point base_url at https://api.deeprelay.ai/v1 and api_key at your key, and your existing code runs as is. The Serverless Inference guide has the Python and TypeScript snippets.

Errors come back as RFC 9457 problem documents. Each carries a request_id; quote it if you write to support.

Want steps 3 and 4 as one script? docs/samples/getting-started/first_call.sh runs the catalog read and the chat completion above and prints [ok] or [FAIL] per step:

export DEEPRELAY_API_KEY=deeprelay_live_...
bash docs/samples/getting-started/first_call.sh

The same thing from the CLI

Once the CLI is installed and logged in (step 1), the two calls above are:

deeprelay models list --modality chat   # the catalog, as a table
deeprelay chat deeprelay/deepseek-v4-flash "Explain HMAC in one sentence"

deeprelay chat streams tokens by default. --no-stream prints the whole response, and --system, --max-tokens and --temperature do what they say. The deeprelay CLI reference has a page per command.

Where to next

  • Serverless Inference — chat, embeddings, image
and video generation, and how each is priced
  • Webhooks — event notifications for video jobs: endpoint
CRUD, delivery and retries, signature verification
  • deeprelay CLI reference — the command-line client
  • Subscription tiers — what each tier includes
  • Key rotation — rotating a key without downtime

Samples verified against demo on 2026-08-06 — the curl steps on this page are run end-to-end by docs/samples/getting-started/first_call.sh against https://api.demo.deeprelay.ai/v1 (the only substitution: DEEPRELAY_API_BASE). Evidence — exact commands and captured output — is committed at .planning/phases/79-missing-api-guides-sow-m4/evidence/getting-started/.

← All docs