Skip to content
Token Cost Index

API

The full approved dataset is readable over a public endpoint. No key needed for reads. The anon key is public by design and row-level security rules ensure only approved entries are visible.

Endpoint

https://YOUR_PROJECT_REF.supabase.co/rest/v1/public_entries

Append query parameters to filter, select, and order results. See thePostgREST documentationfor the full query language.

Available fields

FieldTypeDescription
iduuidUnique identifier for the entry
task_nametextPlain-language name for the task
task_patternenumextraction, classification, summarisation, generation, reconciliation, translation, analysis, agentic_workflow, conversation, other
industry_tagstext[]One or more industry tags
task_unittextThe unit costs are measured against (e.g. per invoice)
providertextLowercase provider slug (e.g. anthropic, openai)
modeltextModel identifier as billed
prompt_strategyenumzero_shot, few_shot, rag, agentic, fine_tuned, other
calls_per_unitnumericAverage API calls per task unit
includes_retriesbooleanWhether token figures include failed calls and retries
input_tokens_medianintegerMedian input tokens per task unit, summed across all calls
output_tokens_medianintegerMedian output tokens per task unit
input_tokens_p90integer90th percentile input tokens, if provided
output_tokens_p90integer90th percentile output tokens, if provided
sample_sizeintegerNumber of task units measured (minimum 10)
measurement_datedateWhen the measurement was taken (YYYY-MM-DD)
methodologytextHow tokens were measured (the trust mechanism)
source_urltextOptional link to a write-up or benchmark
submitter_displaytextOptional public handle for attribution
created_attimestamptzWhen the entry was submitted

Examples

Fetch all entries (curl)

curl "https://YOUR_PROJECT_REF.supabase.co/rest/v1/public_entries" \
  -H "apikey: YOUR_ANON_KEY" \
  -H "Accept: application/json"

Filter by task pattern (curl)

curl "https://YOUR_PROJECT_REF.supabase.co/rest/v1/public_entries?task_pattern=eq.extraction" \
  -H "apikey: YOUR_ANON_KEY" \
  -H "Accept: application/json"

Select specific fields (curl)

curl "https://YOUR_PROJECT_REF.supabase.co/rest/v1/public_entries?select=task_name,model,input_tokens_median,output_tokens_median" \
  -H "apikey: YOUR_ANON_KEY" \
  -H "Accept: application/json"

Fetch from JavaScript (fetch)

const response = await fetch(
  "https://YOUR_PROJECT_REF.supabase.co/rest/v1/public_entries?task_pattern=eq.extraction",
  {
    headers: {
      "apikey": "YOUR_ANON_KEY",
      "Accept": "application/json",
    },
  },
);
const entries = await response.json();
console.log(entries);

Versioned exports

The full approved dataset is also committed as versioned JSON snapshots indata/exports/ in the GitHub repository, refreshed nightly. These are useful for offline analysis, academic work, or building tools without a live API call.

Rate limits and fair use

The API is hosted on Supabase and subject to their rate limits. For bulk access, prefer the versioned JSON exports over repeated API calls. For automated dashboards, cache results rather than polling at high frequency.