modelspec-dev Vocabulary API
The Vocabulary API from modelspec-dev — 1 operation(s) for vocabulary.
The Vocabulary API from modelspec-dev — 1 operation(s) for vocabulary.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/modelspec-dev:modelspec-dev-vocabulary-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: ModelSpec Vocabulary API
version: '2.0'
summary: Decides which AI models fit a job from your requirements, sourced evidence and real cost, and checks them against a compliance policy.
description: 'Start with the compact agent guide https://modelspec.dev/agents.md (version 1-d71e83841e122452). Call decide early with a template-based Spec; refine from reading and recovery hints.
Use when choosing, switching, or checking a model before a task or deploy. POST /v1/decide takes your requirements and returns the models that fit, with reasons, cost per task and ties; when nothing fits, it says what to relax. POST /v1/rank is deprecated: the retired fixed-benchmark ranking, kept for existing callers and never a fallback for decide. POST /v1/policy-check returns, per model and per platform, pass, fail or undetermined against a licence, origin, residency and commercial-use policy, citing the document behind each verdict. After you act on an answer, POST /v1/feedback with a rating (reliable, unreliable, trustworthy, untrustworthy, confusing) and its decision_id; no key.
One call, and no state on your side. Each answer is computed per request from the private bundled catalogue; `build.commit` on every response names the catalogue it was computed from. A request carries a profile or a policy — never a prompt.
Machine data access needs an API key (see x-modelspec-access). GET /v1/health and POST /v1/feedback stay keyless. The free decide page uses the human browser visit gate, with a Turnstile-verified visit token for decide and vocabulary when VISIT_GATE_ENABLED is on. Any key starting `test_` is the sandbox: unlimited, synthetic rows from the real scorer, /v1/rank only.
Without a paid entitlement, policy-check uses public-export evidence. Every check it cannot settle is `undetermined` with `why: tier`, and `determinations.undetermined_for_lack_of_entitlement` counts them. It is never a pass.
Any common HTTP client `User-Agent` works, including Python''s default (`Python-urllib/*`). A `403` with the non-JSON body `error code: 1010` is a refusal at the Cloudflare edge, not from this service. Report it.
Reference: docs/api.md and docs/api-policy-check.md. Generated from the implementation by api/worker/openapi.py.'
license:
name: MIT
url: https://github.com/turbobeest/modelspec
x-error-codes:
- access_not_configured
- access_store_not_configured
- comparison_snapshot_changed
- comparison_snapshot_unavailable
- credits_store_not_configured
- determinations_unavailable
- explanation_unavailable
- export_unavailable
- human_burst_limit
- human_challenge_required
- human_day_limit
- human_gate_unavailable
- human_intent_limit
- human_origin_required
- human_sweep_limit
- insufficient_evidence
- invalid_api_key
- invalid_request
- invalid_spec
- key_revoked
- method_not_allowed
- missing_api_key
- no_match
- no_snapshot
- not_found
- origin_not_allowed
- payload_too_large
- payment_required
- rate_limited
- sandbox_not_available
- snapshot_changed
- snapshot_not_loaded
- snapshot_refused
- snapshot_unavailable
- tier_not_configured
- undetermined_present
- unknown_hardware
- unknown_hosting
- unknown_model
- unknown_platform
- unknown_runtime
- unknown_use_case
- visit_token_expired
- visit_token_invalid
x-transport-error-statuses:
export_unavailable: 502
human_burst_limit: 429
human_challenge_required: 403
human_day_limit: 429
human_gate_unavailable: 503
human_intent_limit: 429
human_origin_required: 401
human_sweep_limit: 429
method_not_allowed: 405
not_found: 404
origin_not_allowed: 404
visit_token_expired: 401
visit_token_invalid: 401
x-max-request-bytes:
/v1/rank: 16384
/v1/decide: 65536
/v1/compare: 65536
/v1/compare-models: 65536
/v1/hardware-fit: 65536
/v1/policy-check: 262144
/v1/signals: 4096
/v1/signals/discovered: 4096
/v1/feedback: 4096
servers:
- url: https://api.modelspec.dev
description: production
security:
- bearer: []
- apiKey: []
tags:
- name: Vocabulary
paths:
/v1/vocabulary:
get:
operationId: displayVocabulary
summary: Display definitions and names for /decide
description: 'Available with DATA_SPLIT_ENABLED. Facet definitions, benchmark and domain names, templates, model/plan IDs and display names, and the snapshot date when available. Aggregate answerability, facet/enum data availability, refinement definitions and a thin boolean are included. Benchmark min/max is included only when at least 3 models have a score on that benchmark; ranges for 1 or 2 scored models are omitted. No prices, allowances, counts, individual scores or archived model names. HUMAN_GATE_ENABLED meters the same keyed visitor Durable Object with an independent 60 per UTC day and 10 per minute budget. With VISIT_GATE_ENABLED, a key takes precedence, otherwise a valid visit token admits and meters a page caller; without either credential ACCESS_ENFORCED decides. Visit allowances are configured separately from decides. Visit replies are no-store and renew the credential in X-ModelSpec-Visit-Token and X-ModelSpec-Visit-Expires. Without the visit flag successful responses use Cache-Control: private, max-age=3600. Starter search or id/ids searches across sections except coverage. Ranked matches and matching section rows share a page of at most 20 hits; starter retains any starter facets on that page. Explicit non-starter lookups stay scoped. Search reads ids, labels, definitions, values and synonyms, excluding nested benchmark domains. All query tokens rank first; other hits match a subset of content tokens and interleave so each token''s best hit leads. A synonym hit keeps matched as label and adds optional via and matched_tokens. total counts those hits. Empty lookups explain the search and suggest the nearest ids across sections. The existing required envelope fields remain present. Compact facets carry id, label, a one-line definition, value_type and the complete allowed_values list. Providers and models carry IDs and display names. The no-query response stays byte-identical for /decide. A funded paid key is charged one credit per 10 successful GET catalog reads ($0.002 each), up front at the start of each block, while the key can pay, capped at 1,000 reads a key a UTC day and 30 a minute, so an agent cannot rebuild a decision from cheap reads. HEAD is the same read as GET and has no body. A key with nothing left to bill for the next block is served under the free tier''s daily limit. A visit token, a free-tier key and an exempt key are not charged this way. A refused read is not charged.'
security:
- bearer: []
- apiKey: []
- visitToken: []
parameters:
- name: section
in: query
required: false
schema:
type: string
enum:
- starter
- facets
- benchmarks
- domains
- providers
- models
- task_types
- coverage
- templates
- refinements
- estate
- vendors
- template_categories
- template_tiers
default: starter
description: Select a compact section. Starter with search or id/ids searches every section except coverage; an explicit non-starter section scopes the lookup. No query parameters returns the unchanged full display vocabulary for /decide.
- name: search
in: query
required: false
schema:
type: string
maxLength: 128
description: Search every section's ids, labels, definitions, values and synonyms when section is starter or omitted. Matching ignores case and runs of underscores, hyphens, dots, slashes or whitespace. Every token matching is the first tier; other hits match a subset of the first 8 unique content tokens, in query order (stopwords, one-character tokens and repeats ignored there; a character is one Unicode code point). Tokens after those 8 still count toward the all-token tier. Subset hits are interleaved so each token's best hit leads. A synonym hit keeps matched as label and sets via to synonym. total counts those hits and is zero only when none match. A search of only separators matches nothing and suggests nothing. Any other miss returns the nearest ids, including below similarity 0.4. An explicit non-starter section scopes the search.
- name: id
in: query
required: false
schema:
type: string
maxLength: 128
description: Full display details for one exact, case-sensitive id. Starter or omitted section resolves across sections. Intersects with search.
- name: ids
in: query
required: false
schema:
type: array
items:
type: string
maxLength: 128
description: Full display details for exact, case-sensitive ids across sections when section is starter or omitted; comma-separated or repeated query parameters. Combined with id by union, then intersected with search.
style: form
explode: false
- name: detail
in: query
required: false
schema:
type: string
enum:
- compact
- full
default: compact
description: Full returns existing display details. Cross-section lookups still page matches; section-scoped full detail selects all matching rows. It never adds private facts.
- name: offset
in: query
required: false
schema:
type: integer
minimum: 0
default: 0
description: Skip ranked matches in a cross-section lookup, or section rows in compact mode. An empty page ends the list.
- name: limit
in: query
required: false
schema:
type: integer
minimum: 1
maximum: 20
default: 20
description: Page size, at most 20 matches. Section-scoped full detail or ids bypass row pagination; cross-section lookups always page.
- name: X-ModelSpec-Visit-Token
in: header
required: false
schema:
type: string
maxLength: 2048
responses:
'400':
description: Invalid vocabulary query
headers:
Link:
$ref: '#/components/headers/AgentGuide'
x-modelspec-guide-version:
$ref: '#/components/headers/AgentGuideVersion'
'200':
description: Display vocabulary
headers:
Cache-Control:
schema:
type: string
Link:
$ref: '#/components/headers/AgentGuide'
x-modelspec-guide-version:
$ref: '#/components/headers/AgentGuideVersion'
content:
application/json:
schema:
type: object
properties:
as_of:
type: string
format: date
description: Snapshot date copied from the full vocabulary's coverage.as_of; absent when unavailable. This metadata does not include catalogue counts.
starter:
type: array
items:
type: object
description: Compact facets used most often in the template specs; only present in a starter lookup.
next:
type: string
description: 'Next-call hint on query lookups: call decide after a hit, or retry vocab with suggestions after a miss.'
spec:
type: object
description: Ready-to-send minimal Spec on starter lookups. Its cost objective is a discovery default, not a quality recommendation.
matches:
type: array
maxItems: 20
description: Ranked hits after offset and limit. Exact ids first, then hits where every query token matches, then subset hits interleaved so each content token's best hit leads. Kind order inside a tier is id, label, definition, value; ties use section and source order.
items:
type: object
properties:
section:
type: string
id:
type: string
label:
type: string
matched:
type: string
enum:
- id
- label
- definition
- value
value:
description: The matching facet value, present only for a value hit.
via:
type: string
enum:
- synonym
description: Present when a synonym supplied a matched token that text did not cover. matched stays label in that case.
matched_tokens:
type: array
items:
type: string
description: Content tokens a subset hit matched, in query order. Absent on an all-token or exact-id hit.
required:
- section
- id
- matched
total:
type: integer
minimum: 0
description: Number of matching entries before paging. Subset hits and in-section synonym hits count. Zero only when nothing matched.
searched:
type: array
items:
type: string
description: Sections searched; present on search and exact-id lookups.
suggestions:
type: array
maxItems: 5
description: Nearest ids across sections; present only when total is zero. Scores the first 8 tokens, each cut to 32 characters, and stops after 300,000 edit-distance cells. Synonym ids score 1. Scores of at least 0.4 are kept; otherwise the best scores above zero are kept. A query of only separators suggests nothing. A facet-value suggestion carries the facet id in id and the value in value, so id= on it resolves.
items:
type: object
properties:
section:
type: string
id:
type: string
value:
description: The closest facet value, present only on a facet-value suggestion.
required:
- section
- id
message:
type: string
description: Explains the searched sections, matched fields and closest ids; present only when total is zero.
unknown_ids:
type: array
items:
type: string
description: Requested ids that are not an exact id in the searched sections. Absent when every requested id matched.
facets:
type: array
items:
type: object
benchmarks:
type: array
items:
type: object
domains:
type: array
items:
type: object
templates:
type: array
items:
type: object
models:
type: object
additionalProperties:
type: object
properties:
display_name:
type:
- string
- 'null'
additionalProperties: false
estate:
type: object
required:
- facets
- domains
- templates
- models
- estate
'401':
description: Missing or invalid API key, invalid visit credential or visit_token_expired
content:
application/json:
schema:
type: object
required:
- error
properties:
error:
type: object
required:
- code
- message
properties:
code:
type: string
message:
type: string
how_to_get_a_key:
type: string
headers:
Link:
$ref: '#/components/headers/AgentGuide'
x-modelspec-guide-version:
$ref: '#/components/headers/AgentGuideVersion'
'403':
description: Key revoked
headers:
Link:
$ref: '#/components/headers/AgentGuide'
x-modelspec-guide-version:
$ref: '#/components/headers/AgentGuideVersion'
'404':
description: Data splitting is disabled
headers:
Link:
$ref: '#/components/headers/AgentGuide'
x-modelspec-guide-version:
$ref: '#/components/headers/AgentGuideVersion'
'429':
description: Vocabulary visitor cap exceeded, a funded key's daily or burst catalog-read cap, or the free tier's daily limit once nothing is left to bill; Retry-After names the wait
headers:
Link:
$ref: '#/components/headers/AgentGuide'
x-modelspec-guide-version:
$ref: '#/components/headers/AgentGuideVersion'
'503':
description: Visitor identity, counter or credit ledger unavailable
headers:
Link:
$ref: '#/components/headers/AgentGuide'
x-modelspec-guide-version:
$ref: '#/components/headers/AgentGuideVersion'
'502':
description: Bundled vocabulary unavailable
headers:
Link:
$ref: '#/components/headers/AgentGuide'
x-modelspec-guide-version:
$ref: '#/components/headers/AgentGuideVersion'
tags:
- Vocabulary
components:
headers:
AgentGuide:
description: Compact agent guide.
schema:
type: string
const: <https://modelspec.dev/agents.md>; rel="describedby"
AgentGuideVersion:
description: Version of the byte-stable guide.
schema:
type: string
const: 1-d71e83841e122452
securitySchemes:
bearer:
type: http
scheme: bearer
description: 'Authorization: Bearer <key>. Takes precedence.'
apiKey:
type: apiKey
in: header
name: X-API-Key
description: 'X-API-Key: <key>. Never in the query string.'
signalHmac:
type: apiKey
in: header
name: X-ModelSpec-Signature
description: sha256=<HMAC-SHA256 of the exact request bytes>.
signalReadKey:
type: http
scheme: bearer
description: Repository-only key for pending and acknowledgement automation.
visitToken:
type: apiKey
in: header
name: X-ModelSpec-Visit-Token
description: Human browser credential from the Turnstile-verified visit gate. Bound to the visitor and allowed site origin; admits only decide and vocabulary. Machine callers use an API key.
x-modelspec-access:
status: wired; enforced
ticket: MODEL-69
enforced: true
switch: ACCESS_ENFORCED in api/worker/wrangler.jsonc
key_store_bound: true
effect_today: 'Every machine data endpoint needs an API key: a request without one is refused 401 missing_api_key, naming https://modelspec.dev/pricing. GET /v1/health and POST /v1/feedback stay keyless. The free decide page uses the human browser visit gate: with VISIT_GATE_ENABLED, a Turnstile-verified visit token admits only decide and vocabulary for its bound visitor and origin. The ACCESS key store is bound. Existing live keys are checked against it; test_ keys use the sandbox.'
policy_check_paid_entitlement:
status: granted to a presented key with remaining credits, or a credit-exempt paid tier
granted_by: entry.py::_entitlement
effect_today: 'Public-export evidence has determinations.entitlement public_export; checks they cannot settle come back undetermined with why: tier and available_in_tier: paid. A funded key reads the determinations, or gets HTTP 503 determinations_unavailable when the store cannot be read. A credit-exempt paid tier also reads the determinations without a balance. Other keys with zero credits get the public-export answer plus credits.exhausted.'
present_key_as:
- 'Authorization: Bearer <key>'
- 'X-API-Key: <key>'
never: a key in the query string
policy_version: access-v1
sandbox_prefix: test_
sandbox_endpoints:
- POST /v1/rank
timezone: UTC
tiers:
dpf:
daily_limit: null
burst_limit_per_minute: null
live_data: true
description: 'Unlimited, and deliberately on the same handler as a paid key: null limits, not a bypass.'
free:
daily_limit: 10
burst_limit_per_minute: 5
live_data: true
description: Live rankings. Enough for a genuine decision, not for a build loop. No determinations.
friends:
daily_limit: null
burst_limit_per_minute: 60
live_data: true
description: 'Friends and family: live paid access without credit charges. No daily limit; the paid tier''s burst cap applies. Usage is recorded.'
paid:
daily_limit: null
burst_limit_per_minute: 60
live_data: true
description: 'Funded key: paid answer including determinations. No daily limit; burst is configuration. Entitlement follows remaining credits, not this flag alone.'
sandbox:
daily_limit: null
burst_limit_per_minute: null
live_data: false
description: Fixed, obviously synthetic results. Unlimited, no signup, no live data.
refusals:
access_not_configured: 500
access_store_not_configured: 503
invalid_api_key: 401
key_revoked: 403
missing_api_key: 401
rate_limited: 429
sandbox_not_available: 400
tier_not_configured: 500
documented_in: docs/api-access.md
x-modelspec-billing:
status: wired; enabled
ticket: MODEL-93
enabled: true
switch: BILLING_ENABLED in api/worker/wrangler.jsonc
unit: credit
what_is_sold: 'credits on this API key: a monthly allowance that resets each paid invoice (no rollover), and/or pack credits that expire 12 months after purchase. A funded key receives the paid answer, including cited commercial-use and data-residency determinations. Only successful results draw credits.'
documented_in: docs/billing.md
x-modelspec-x402:
wired: true
enabled: true
mainnet: true
network: eip155:8453
per_credit_atomic: 20000
keyless_price_rule: 20000 atomic USDC per endpoint credit
packs:
- name: 250-credit pack
credits: 250
usd: 5
atomic: 5000000
- name: 1,300-credit pack
credits: 1300
usd: 25
atomic: 25000000
- name: 2,750-credit pack
credits: 2750
usd: 50
atomic: 50000000
- name: 6,000-credit pack
credits: 6000
usd: 100
atomic: 100000000
facilitator: https://api.cdp.coinbase.com/platform
docs: docs/x402.md