Skip to content

API Overview

The OpenScouter REST API lets you programmatically create studies, manage tests, retrieve results, and integrate with external systems. All endpoints accept and return JSON.

Base URL

https://openscouter.com/api

All paths in this reference are relative to this base.

Authentication

Every request must include an Authorization header unless the endpoint is marked None.

MethodHeader formatUsed by
JWTAuthorization: Bearer <jwt>Authenticated user actions
TokenAuthorization: Token <token>Server-to-server integrations
BearerAuthorization: Bearer <token>OAuth flows and external clients
Webhookx-webhook-secret: <secret>Incoming webhook payloads
CronAuthorization: Bearer <cron-secret>Scheduled background jobs

JWTs are issued at sign-in and expire after 24 hours. Refresh tokens are valid for 30 days.

Response Envelope

Every response follows the same structure:

{
"success": true,
"data": { },
"error": null,
"metadata": {
"page": 1,
"limit": 20,
"total": 142
}
}
FieldTypeDescription
successbooleantrue when the request succeeded
dataobject | array | nullThe response payload
errorstring | nullHuman-readable error message, null on success
metadataobject | nullPagination info, present on list endpoints

On error, data is null and error contains a description:

{
"success": false,
"data": null,
"error": "Session not found",
"metadata": null
}

Pagination

List endpoints support cursor-free page-based pagination via query parameters:

GET /api/sessions?page=1&limit=20
ParameterDefaultMax
page1unlimited
limit20100

Pagination details are returned in metadata.page, metadata.limit, and metadata.total.

Rate Limiting

TierLimit
Unauthenticated30 requests / minute
Authenticated (free)120 requests / minute
Authenticated (pro)600 requests / minute
Webhook ingestion1,000 events / minute

When you exceed the limit the API returns HTTP 429 with a Retry-After header in seconds.

CORS

The API allows cross-origin requests from:

  • https://openscouter.com
  • https://*.openscouter.com
  • http://localhost:* (development only)

All other origins are blocked. Preflight OPTIONS requests return 200 with appropriate CORS headers.

HTTP Error Codes

CodeMeaning
400Bad Request. The request body or query parameters are malformed.
401Unauthorized. The Authorization header is missing or invalid.
403Forbidden. The token is valid but lacks permission for this action.
404Not Found. The requested resource does not exist.
422Unprocessable Entity. Validation failed. The error field lists the first violation.
429Too Many Requests. Rate limit exceeded. Check Retry-After.
500Internal Server Error. Something went wrong on our end.

Versioning

The API is currently unversioned. Breaking changes are announced in the changelog with a minimum 30-day deprecation window.