Docs
Sign inStart free
Documentation/Your first call in 60 seconds

Your first call in 60 seconds

Set $STELQ_KEY, POST to /v1/search/query, read X-Request-Id — your first successful call is the activation moment. Signup already minted a live key and seeded $5.00 of free credit, so you reach a billed 200 before ever touching Stripe.

3 min readFor developersopen as text

01You already have a key and $5

You don't have to set anything up to make your first call. The moment you signed up, STELQ minted you a live API key named Primary Key and seeded your balance with $5.00 of free welcome credit — no card, no Stripe, nothing to configure. Your first request can hit a billed 200 immediately.

Your Primary Key secret was shown to you exactly once, right after signup — it arrived on the console URL as ?newKey=… and was wiped from the address bar as soon as the page loaded. If you saved it, set it as $STELQ_KEY and skip ahead. If you didn't, that secret is gone for good — mint a fresh key under API Keys (see Authentication).

What signup gave youValue
Live keyOne key named Primary Key, secret returned once
Free credit$5.00, no card required
First billed callSearch at $0.001 — about 5,000 queries on the welcome credit alone

Set the secret as an environment variable so nothing downstream pastes a live credential into a prompt or a chat log:

Set your key
export STELQ_KEY="stelq_live_…"   # the secret from ?newKey= at signup

02One curl to a 200

Search is the lowest-cost service at $0.001 per query, so it's the right place to spend your first call and watch the free credit barely move. This is the exact cURL the console generates from the live Search contract; copy it as-is:

POST /v1/search/query
curl -X POST https://api.stelq.com/v1/search/query \
  -H "Authorization: Bearer $STELQ_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"best ai search infra 2026","limit":10,"search_mode":"auto"}'

A 200 comes back synchronously — one request, one response — with ranked results carrying titles, URLs and snippets:

200 OK
{
  "query": "best ai search infra 2026",
  "count": 10,
  "results": [
    {
      "title": "Building AI-native search in 2026",
      "url": "https://example.com/ai-search",
      "snippet": "An overview of live-index search infrastructure…",
      "published": "2026-05-31"
    }
  ]
}

That 200 is your activation moment — the first time STELQ ran live web search over a query you chose and billed you for it. Everything else in these docs is built on this one round trip.

03How to know it worked

Beyond the 200 status, every successful response carries two headers that prove the call reached the engine and tell you how it performed. Read them on the response, not the body:

Response headerWhat it tells you
X-Request-IdA unique id for this exact request — quote it in support tickets and use it to correlate the call in your Activity log.
X-Latency-MsHow long the upstream engine took to answer, in milliseconds.

To see them, add -i to the cURL above (or inspect response headers in your client):

See the headers
curl -i -X POST https://api.stelq.com/v1/search/query \
  -H "Authorization: Bearer $STELQ_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"best ai search infra 2026"}'

# HTTP/2 200
# x-request-id: srch_…
# x-latency-ms: 312
# content-type: application/json

Failed attempts are free. STELQ only charges on success: any response with a 4xx or 5xx status records a cost of $0.00, so you can retry a malformed first call as many times as it takes to get your 200 without spending a cent of your $5.

If your call came back 4xx or 5xx instead of 200, every status code is uniform across the platform and the error body tells you which field is wrong — see Errors & status codes. And if you're wiring an agent rather than a shell, the same activation moment applies: connect the MCP server and prove it with one real call (see Connect an agent).

04Related