NEMESIS API
Start checks from scripts and CI, follow them and read the results
Quick start
- Create a key on the API keys page.
- Start a check. The response comes back at once with its ID.
- Poll the check every 10–30 seconds until it finishes, or stream its progress.
Authentication
Send the key in the Authorization header. Each key has permissions; a request outside them gets 403.
Authorization: Bearer nmk_8kQ2xV1pZr0a_…Keys cannot create keys or change the account. Those actions need a signed-in browser.
Start a check
Give the reference as reference_endpoint, reference_api_key and reference_model, or name a key saved in your account with reference_saved_key. The second needs the provider-keys:use permission.
curl -X POST https://isthismodel.com/api/v1/checks \
-H "Authorization: Bearer $NEMESIS_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: build-1842" \
-d '{
"endpoint": "https://api.provider.example/v1",
"api_key": "sk-…",
"model": "claude-opus-4-8",
"reference_saved_key": "openrouter",
"reference_model": "anthropic/claude-opus-4.8",
"tier": "base",
"visibility": "private"
}'Provider keys you send are encrypted for the worker, held only while the check runs, then deleted. They never reach the database and are never returned.
Follow it
status goes queued → running → complete, or ends as failed or cancelled. result is there exactly when status is complete, and null in every other state. A failed check says why in failure.
Live progress
A Server-Sent Events stream. Frames already sent are replayed first. The stream ends after the final frame.
curl -N https://isthismodel.com/api/v1/checks/$ID/events \
-H "Authorization: Bearer $NEMESIS_KEY"
: connected
data: {"seq": 1, "type": "stage.enter", "stage": "preflight", "message": "…"}
data: {"seq": 2, "type": "probe.start", "stage": "probing", "message": "…"}
…
data: {"seq": 88, "type": "run.complete", "stage": "complete", "message": "…"}Safe retries
Send an Idempotency-Key header when starting a check. A retry with the same key and body returns the first check instead of starting another, for 24 hours.
Gate a build on the result
A check ends as complete, failed or cancelled, and only a complete one is a result about the provider. Pass the build only when all of this holds:
- status is complete. A failed check is not a pass and not a finding: failure.code says why, and failure.retryable says whether starting it again can help.
- result.trust is not null.
- result.measurement_incomplete is false. Otherwise the score rests on a thin base: read this before the score.
- The lower end of result.trust_ci is at or above your bar. Use the lower end, not trust: it already allows for noise.
- No signal in result.signals has grade proven and a penalty above 0. A proven finding is a contradiction, not a low number, and no score makes up for it.
# exit 0 = pass, 1 = the provider fell below the bar, 2 = no usable result
check=$(curl -sf "$NEMESIS/api/v1/checks/$ID" -H "Authorization: Bearer $NEMESIS_KEY")
echo "$check" | jq -e '.status == "complete"
and .result.trust != null
and (.result.measurement_incomplete | not)' > /dev/null || exit 2
echo "$check" | jq -e --argjson min 70 '
.result.trust_ci[0] >= $min
and ([.result.signals[] | select(.grade == "proven" and .penalty > 0)] | length == 0)
' > /dev/nullThe score moves when the formula changes. Note formula_version when you pick the bar, and look at it again when that value changes: the same provider can score differently under a new formula.
A check that did not finish
result is null and failure is set. error is diagnostic text for a person; do not parse it. The codes:
{
"id": "6f0c…",
"status": "failed",
"error": "provider is out of credit: ProviderError: HTTP 402 …",
"failure": { "code": "provider_out_of_credit", "retryable": false },
"result": null
}| failure.code | retry may help | when |
|---|---|---|
provider_key_rejected | no | A provider refused the key it was given (HTTP 401 or 403). |
provider_out_of_credit | no | A provider reported that the account behind the key has no credit left (HTTP 402). |
provider_rate_limited | yes | A provider rate-limited the check while it was running (HTTP 429). |
provider_model_not_found | no | A provider answered that it does not serve the model (HTTP 404). |
provider_unavailable | yes | A provider stopped answering, timed out or returned a server error. |
reference_model_not_found | no | The reference does not serve the model under that name or any normalised equivalent, so there was nothing to compare against. Name the reference model explicitly. |
reference_spend_guard | no | The reference key's own spending limit could not be confirmed, or too little of it was left for a check. |
key_expired | yes | A submitted key was no longer held when the check started, so it could not run. Keys are kept only while a check waits and runs; start the check again. |
reference_unavailable | no | The check had no usable reference: it was queued for the retired house reference, or no reference address was recorded. |
internal_error | yes | The check failed inside NEMESIS. Starting it again may work; if it does not, report the check id. |
unclassified | no | The check failed before reasons were recorded as codes. The diagnostic text in `error` is all there is. |
Errors
Every /api/ route answers errors in one shape. Branch on code; message is for people and is English. A 429 carries Retry-After in seconds.
HTTP/1.1 429 Too Many Requests
Retry-After: 2400
X-Request-Id: 4f1c…
{
"error": {
"code": "quota_exceeded",
"message": "base runs are limited to 10 per hour. …",
"request_id": "4f1c…"
}
}The table is the list the server itself answers with. New codes may be added; treat one you do not know by its HTTP status.
| HTTP | code | retry may help | when |
|---|---|---|---|
| 400 | bad_request | no | The request could not be understood. |
| 400 | expired | no | The key has expired. |
| 400 | invalid_cursor | no | The pagination cursor is not valid. |
| 400 | invalid_request | no | The request was refused for a reason given in `message`. |
| 400 | invalid_url | no | The URL is not an address a provider can have. |
| 400 | key_rejected | no | The provider refused the key. |
| 400 | limit_not_confirmed | no | The provider cannot show the key's spending limit, so it cannot be confirmed. |
| 400 | low_remaining | no | Too little is left on the key's limit for a check. |
| 400 | management_key | no | The key is a management key, which cannot run models. |
| 400 | no_balance | no | The provider account has no balance. |
| 400 | no_limit | no | The key has no credit limit. |
| 400 | no_saved_key | no | No key is saved for that provider. |
| 400 | provider_rejected | no | A provider refused the key, the model or the request when tested before the check. |
| 400 | reference_expired | no | For the reference key: the key has expired. |
| 400 | reference_key_rejected | no | For the reference key: the provider refused the key. |
| 400 | reference_low_remaining | no | For the reference key: too little is left on the key's limit for a check. |
| 400 | reference_management_key | no | For the reference key: the key is a management key, which cannot run models. |
| 400 | reference_no_limit | no | For the reference key: the key has no credit limit. |
| 400 | reference_wrong_provider | no | For the reference key: the key does not look like it belongs to that provider. |
| 400 | unknown_integration | no | There is no such provider integration. |
| 400 | wrong_provider | no | The key does not look like it belongs to that provider. |
| 401 | api_key_expired | no | The API key has passed its expiry. |
| 401 | api_key_revoked | no | The API key was revoked. |
| 401 | invalid_api_key | no | The API key does not exist or is malformed. |
| 401 | invalid_authorization | no | The Authorization header is not `Bearer <api key>`. |
| 401 | invalid_credentials | no | The email or password is wrong. |
| 401 | unauthenticated | no | No credentials were sent, or the session has ended. |
| 403 | account_disabled | no | The account is disabled. |
| 403 | cross_site_request | no | A write from a browser session must come from our own pages. |
| 403 | forbidden | no | The caller may not do this. |
| 403 | insufficient_scope | no | The API key lacks a scope the endpoint needs. |
| 403 | registration_closed | no | Sign-up is closed. |
| 403 | session_required | no | The action is only available from a signed-in browser, not with an API key. |
| 404 | not_found | no | There is nothing at that id or address, or the caller may not see it. |
| 405 | method_not_allowed | no | The endpoint does not take that HTTP method. |
| 409 | check_finished | no | The check is already over. |
| 409 | check_running | no | The check has started and can no longer be cancelled. |
| 409 | conflict | yes | The change collided with another one; reload and retry. |
| 409 | email_taken | no | An account with this email already exists. |
| 409 | idempotency_in_progress | yes | A request with the same Idempotency-Key is still being processed. |
| 409 | key_limit_reached | no | The account holds as many API keys as it may. |
| 409 | key_unreadable | no | The saved key can no longer be opened; save it again. |
| 422 | idempotency_key_reused | no | The Idempotency-Key was already used with a different body. |
| 422 | invalid_email | no | The email address is not valid. |
| 422 | key_whitespace | no | The key contains whitespace. |
| 422 | validation_error | no | A field failed validation. `details` lists them, without the values sent. |
| 422 | weak_password | no | The password does not meet the rules. |
| 429 | budget_paused | yes | Checks are paused until the service-wide daily budget resets at 00:00 UTC. `Retry-After` says when. |
| 429 | quota_exceeded | yes | The run quota for this caller and tier is used up. `Retry-After` says when a unit frees. |
| 429 | rate_limited | yes | Too many requests in the current window. `Retry-After` says how long to wait. |
| 500 | internal_error | yes | Something failed on our side. Quote the request id. |
| 502 | provider_unreachable | yes | A provider could not be reached when tested before the check. |
| 502 | reference_provider_unreachable | yes | The reference provider did not say how much its key may spend. |
| 502 | upstream_error | yes | A service we depend on answered badly. |
| 503 | queue_full | yes | Too many checks are waiting for a worker. `Retry-After` says when to try again; nothing was started or counted against your limits. |
| 503 | unavailable | yes | The service is not available right now. |
Limits
Up to 120 requests a minute per key, reported in the RateLimit-* headers. Starting a check also uses the account limit: 10 standard checks an hour and 3 deep checks a day. GET /api/v1/usage shows what is left.
Versioning
Everything is under /api/v1. Within v1 fields and endpoints are only added, never renamed or removed. A breaking change would ship as /api/v2 alongside it.
Not in the API
No webhooks: poll or stream instead. No listing or search of providers: lookup takes an exact address, as on the site.
Endpoints
Account
- GET
/api/v1/auth/scopesList the scopes an API key can holdno key needed - POST
/api/v1/auth/registerCreate an account and sign inno key needed - POST
/api/v1/auth/loginSign inno key needed - POST
/api/v1/auth/logoutSign out this browserno key needed - GET
/api/v1/auth/sessionWhether this browser is signed inno key needed - GET
/api/v1/accountThe account making this request - DELETE
/api/v1/accountDelete the accountbrowser session only - POST
/api/v1/account/passwordChange the passwordbrowser session only - GET
/api/v1/account/sessionsBrowsers signed in to this accountbrowser session only - DELETE
/api/v1/account/sessions/{session_id}Sign out one browserbrowser session only - POST
/api/v1/account/sessions/revoke-othersSign out every other browserbrowser session only - GET
/api/v1/usageRun quota and request allowance left
API keys
- GET
/api/v1/keysList this account's API keysbrowser session only - POST
/api/v1/keysCreate an API keybrowser session only - DELETE
/api/v1/keys/{key_id}Revoke an API keybrowser session only
Depths and models
- GET
/api/v1/integrationsReference APIs a key can be saved forno key needed - GET
/api/v1/catalog/openrouterOpenRouter models a reference can beno key needed - GET
/api/v1/provider-keysProvider keys saved in this accountbrowser session only - PUT
/api/v1/provider-keys/{provider}Save or replace the key for one integrationbrowser session only - DELETE
/api/v1/provider-keys/{provider}Delete a saved provider keybrowser session only - POST
/api/v1/provider-keys/{provider}/refreshAsk the provider for the key's current limitbrowser session only - GET
/api/v1/provider-keys/{provider}/modelsModels the saved key can reachbrowser session only - GET
/api/v1/tiersWhat each depth tier costsno key needed - GET
/api/v1/errorsEvery error code and failure codeno key needed
Checks
- GET
/api/v1/checksList this account's checkschecks:read - POST
/api/v1/checksStart a checkchecks:write - GET
/api/v1/checks/{check_id}Get a check and its resultchecks:read - GET
/api/v1/checks/{check_id}/eventsStream a check's progress (Server-Sent Events)checks:read - POST
/api/v1/checks/{check_id}/cancelCancel a queued checkchecks:write - POST
/api/v1/preflightTest provider connections without starting a checkchecks:write
Providers
- POST
/api/v1/providers/lookupThe public record for an exact provider URLproviders:read