Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API 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.
openapi: 3.2.0
info:
title: ModelSpec Compare 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:
# --- truncated at 32 KB (54 KB total) ---
# Full source: https://artifacts.apis.io/modelspec-dev/openapi/modelspec-dev-compare-api-openapi.yml