Quickstart
Everything you need to go from zero to your first POST /v1/search response.
-
Create an account. Sign in at aptrouter.com with GitHub or an email magic link.
-
Mint your API key. From the dashboard, generate your secret key — the
sk_live_…value is shown once, right after. Copy it immediately; only its hash is stored. You can reveal, copy, or rotate it from the dashboard anytime. -
Add credits. Billing is prepaid — no plans, no subscription, no free tier. Top up from the dashboard (Stripe); each
POST /v1/searchcosts $0.005 (1 credit, $5 per 1,000 searches). When your balance hits zero the API returns402until you top up again. Pricing: aptrouter.com/pricing. -
Store the key as an environment variable. Never commit it.
Terminal window export APTROUTER_API_KEY="sk_live_…" -
Make your first call.
Terminal window curl -X POST https://api.aptrouter.com/v1/search \-H "authorization: Bearer $APTROUTER_API_KEY" \-H "content-type: application/json" \-d '{"query":"statins and breast cancer survival","limit":3}' -
Or search right in the dashboard. Don’t want to leave the browser? The Search page has a built-in search box — paste your key once (it’s remembered in your browser only, never stored on our servers), and query the corpus interactively. Each search meters one credit, exactly like the API.
Read the response
Section titled “Read the response”Results come back in a deliberately token-lean envelope — abbreviated keys, no filler — built for agents that pay per token downstream:
{ "n": 2, "results": [ { "d": "MED-10", // identifier — DOI (or source id) of the document "t": "Statin Use and Breast Cancer Survival: A Nationwide Cohort Study from Finland", "y": 2014, // publication year (0 if unknown) "a": ["Murtola TJ", "Visvanathan K"], // authors (first few) "s": 1.0, // relevance score in [0,1] "q": "Recent studies have suggested that statins could delay or prevent breast cancer recurrence but the effect on disease-specific mortality remains unclear." } // … ]}| Key | Meaning |
|---|---|
d | Identifier — DOI (or source id) of the document |
t | Title |
y | Publication year (0 if unknown) |
a | Authors (first few) |
s | Relevance score in [0,1], rounded to 3 decimals |
q | The verbatim cited sentence(s) — quotable as-is |
q is the heart of the product: the highest-scoring sentence from the source
itself, never LLM-rewritten. Need more context? Opt in to full abstracts with
"fields": "abstract" — each result gains an ab field.
Every response also carries an X-Token-Budget header (estimated token count
of the body, ~4 chars/token) plus an X-Credit-Balance header reporting your
remaining prepaid credit balance — see Authentication & keys.
Next steps
Section titled “Next steps”- Authentication & keys — key management, quota headers, error codes.
- Search API — the verbatim guarantee, retrieval lanes, and token budgets in depth.
- API reference — the full
POST /v1/searchcontract, generated from the OpenAPI spec.