Skip to content

Quickstart

Everything you need to go from zero to your first POST /v1/search response.

  1. Create an account. Sign in at aptrouter.com with GitHub or an email magic link.

  2. 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.

  3. Add credits. Billing is prepaid — no plans, no subscription, no free tier. Top up from the dashboard (Stripe); each POST /v1/search costs $0.005 (1 credit, $5 per 1,000 searches). When your balance hits zero the API returns 402 until you top up again. Pricing: aptrouter.com/pricing.

  4. Store the key as an environment variable. Never commit it.

    Terminal window
    export APTROUTER_API_KEY="sk_live_…"
  5. 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}'
  6. 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.

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."
}
// …
]
}
KeyMeaning
dIdentifier — DOI (or source id) of the document
tTitle
yPublication year (0 if unknown)
aAuthors (first few)
sRelevance score in [0,1], rounded to 3 decimals
qThe 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.