Skip to main content

HTTP API

The jevlin binary is one client of a public HTTP API, and anything that can send JSON over HTTPS can use it the same way. One project key authenticates every call, and an agent can register for a key without a person.

These pages are for calling the API yourself. If you use Jevlin through a coding agent, the binary already does all of this; start at the quickstart instead.

Hosts​

hostserves
https://api.jevlin.aiThe search API: search, stream, fetch, decisions, fast presets, traces, feedback, judge, limits, turns, rollouts, account, and the public /healthz.
https://agents-v1.jevlin.aiAgent onboarding: register, the status poll, self-lookup and a fresh claim code. See How an agent gets an API key.
https://platform.jevlin.aiThe platform people sign in to: keys, limits, credit, traces and the claim page at /claim. Not called with a key.

Authentication​

Send Authorization: Bearer sr-… on every call except registration and /healthz. Keys start with sr-. Create one on a project's API keys page on the platform, or let an agent register for one. Never put a key in a URL, a query string or a log line.

A key can be limited to some of three scopes, search, read and limits; the table below says which one each route needs, and a key with no scopes may do everything. See Limits, keys and headers.

All three hosts sit behind Cloudflare, so send a real User-Agent. curl's and Go's defaults pass; Python's default urllib agent is challenged.

Endpoints​

method · pathscopespend-freewhat it does
POST /v1/searchsearchnoOne query, sent to several search providers at once, ranked, with costs and a trace id. Search
POST /v1/search/streamsearchnoThe same search, streamed as NDJSON events as each provider answers. Search
POST /v1/fetchsearchnoThe full text of up to five pages your own recent searches returned. Read a page in full
POST /v1/decisionssearchnoTyped questions about a state, answered by a decision model with probabilities. Not offered on the hosted service yet: 503 decisions_disabled. Decisions
GET /v1/decisions/modelsreadyesThe decision models offered, each one's price, and whether this account can call it. 503 decisions_disabled on the hosted service for now.
GET /v1/fast-setsread or searchyesThe fast presets the router offers, and the default. Search
GET /v1/tracesreadyesYour project's recent requests, newest first, a page at a time. Traces and feedback
GET /v1/traces/{id}readyesOne trace: the full response, every provider's status and cost.
POST /v1/feedbacksearchnoLabels on a trace, such as the results you cited. They train the ranker.
POST /v1/judgesearchnoExperimental: an LLM judge's grades for a trace. Not calibrated yet.
POST /v1/turnssearchyesHow a turn of an agent session ended. Optional, free, on its own rate.
POST /v1/rollouts/outcomesearchyesAttach the answer, the outcome and the reward to one of your rollouts, afterwards. Rollouts
DELETE /v1/rollouts/outcomesearchyesDelete your own outcomes, by rollout, question or group.
GET /v1/rollouts/summaryreadyesSearches, dated and live, cache hits and cost, per rollout, question and group.
GET /v1/rollouts/exportreadyesYour rollouts as NDJSON: each search with its stored response, its cutoff and its cost, beside the outcome and the reward.
GET /v1/limitsreadyesYour spend caps, and the spend today, this week and this month against them. Limits, keys and headers
POST /v1/limitslimitsyesSet daily, weekly and monthly spend caps.
GET /v1/accountreadyesThe calling key (scopes, expiry), the rate windows, spend and caps, and retention, in one read.
GET /healthznone—The public readiness probe: {"ok": true}, or 503.
POST /v1/agents/registernone—On agents-v1: an agent mints its own key, with no credential.
GET /v1/agents/mekey—On agents-v1: the agent's status, found by the key alone.
GET /v1/agents/{agent_id}key—On agents-v1: the status poll, unclaimed, claimed or expired.
POST /v1/agents/{agent_id}/claim-codekey—On agents-v1: a fresh claim link for an agent still unclaimed.

A spend-free route works when the account is out of credit or at its spend ceiling; the others are refused with a 402 then. Spend-free is not rate-free: Rate limits says which calls count.

Every search, stream, fetch or decision response carries X-Request-Id before any body bytes. It is the trace id, equal to the body's request_id; keep it, since support and every trace read key on it. A search also names what answered it in decision.build: the router's build (version) and its tier configuration (config_hash).

Errors have one shape per host and a code to branch on; see Errors.

The first request​

curl -s https://api.jevlin.ai/v1/search \
-H "Authorization: Bearer $JEVLIN_API_KEY" \
-H "Content-Type: application/json" \
-d '{"query": "state of grid-scale battery storage 2026", "tier": "balanced"}'

The answer holds ranked candidates[], one per provider with its own status and cost_micros, and usage.cost_micros, what the call cost in millionths of a dollar (1,000,000 is $1). Add "view": "merged" for one list of pages across every provider, each saying which providers found it. The tiers and every request field are on Search.

For AI agents​

Calling the API from Claude or another agent without the jevlin binary? Give it the skill file. It carries the whole contract in one file:

  • self-registration and the claim;
  • the search request and how to read the answer;
  • threading searches into a trajectory, and the turn end;
  • fetching a page in full;
  • rate limits, spend caps and the account read;
  • the feedback vocabulary;
  • what to do on every error: stop on a 401, tell the person on a 402, honor Retry-After on a 429, and never loop on a billing error.

The two files:

Both name the hosts above and are served from this site.