Documentation
One streaming endpoint per platform. Every row arrives already formatted for training.
The Alrithm API serves verified reasoning data as newline-delimited JSON. Each row carries a problem statement, a reference implementation, a step-by-step derivation, and a SHA-256 proof that binds the input to the answer.
Datasets are organized into platforms. Two are published today:
| Platform | id | Content |
|---|---|---|
| ALR Code Platform | alr-code-platform | Verified reasoning traces for code: algorithm solutions, debugging, optimization, explanation, and review. |
| ALR Aerospace Platform | alr-aerospace-platform | Verified reasoning traces for orbital mechanics, propulsion, atmosphere, guidance, and related computations. |
Base URL: https://alrithmapi.vercel.app/api/v1
Create an API key on the API Keys page, then stream any published platform. Same command in three languages:
curl -N \
"https://alrithmapi.vercel.app/api/v1/models/alr-code-platform/data?format=openai" \
-H "Authorization: Bearer sk-your-key" \
> training.jsonlSwap alr-code-platform for alr-aerospace-platform to pull the aerospace corpus instead. See Available models for the full list.
Every request to a data endpoint includes an API key in the Authorization header using the Bearer scheme.
Authorization: Bearer sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxScopes
Each key carries a scope that determines which endpoints it can access.
| Scope | Access | Use case |
|---|---|---|
| sample | Preview endpoints only | Evaluating row format |
| full | Streaming + all data endpoints | Production training |
A platform is a group of datasets that share a common domain and are served from one streaming URL. Two platforms are published:
| Platform | id | Categories |
|---|---|---|
| ALR Code Platform | alr-code-platform | solve, debug, optimize, explain, review |
| ALR Aerospace Platform | alr-aerospace-platform | propulsion_mass_budget, orbital_mechanics, orbit_perturbations, launch_geometry_windows, atmosphere, hardware_engineering, guidance_estimation, ascent_simulation, and six refusal categories |
Every published platform is available to any full-scope API key. The sample_type parameter filters rows within a platform.
/api/v1/modelsReturns every published platform. No authentication required.
$ curl https://alrithmapi.vercel.app/api/v1/models{
"ok": true,
"object": "list",
"data": [
{
"id": "alr-aerospace-platform",
"label": "ALR Aerospace Platform",
"datasetCount": 14,
"rowCount": 2800,
"fileSize": 9707161,
"endpoints": {
"detail": "/api/v1/models/alr-aerospace-platform",
"data": "/api/v1/models/alr-aerospace-platform/data"
}
},
{
"id": "alr-code-platform",
"label": "ALR Code Platform",
"datasetCount": 70,
"rowCount": 14000,
"fileSize": 79068597,
"endpoints": {
"detail": "/api/v1/models/alr-code-platform",
"data": "/api/v1/models/alr-code-platform/data"
}
}
]
}Pass the id of any entry to the data endpoint to stream it.
/api/v1/models/{id}/dataStreams every row of the platform as newline-delimited JSON. Requires a full-scope key.
Query parameters
| Name | Type | Description |
|---|---|---|
| format | string | Output shape. raw, openai, or completion. Defaults to raw. |
| sample_type | string | Filter by task type or category. Omit for all rows. |
Filtering by category
Every row carries a sample_type describing the reasoning operation it teaches. Filter on it to pull a specific slice of a platform.
$ curl -N \
"https://alrithmapi.vercel.app/api/v1/models/alr-code-platform/data?sample_type=debug&format=openai" \
-H "Authorization: Bearer sk-your-key" \
> debug.jsonlX-Sample-Type header echoing the filter, or all when no filter was applied. If the platform contains no rows of the requested type, the endpoint returns 404 NO_ROWS_FOR_TYPE.application/x-ndjson — one JSON object per line, delivered as the data is decrypted and converted. Safe to pipe directly into a file. No size cap.The format parameter transforms each row on the way out. Same data, different shapes.
openai
{
"messages": [
{ "role": "system", "content": "You are an expert at dynamic programming…" },
{ "role": "user", "content": "Find the length of the longest common subsequence…" },
{ "role": "assistant", "content": "An independent reference method … Final answer: 3" }
]
}completion
{
"prompt": "Question: Find the length of…\n\nProvide a step-by-step solution…",
"completion": "An independent reference method … Final answer: 3"
}raw
The verified row as-is with full provenance metadata. Use this if your pipeline expects the source schema — see Row schema.
| Field | Type | Description |
|---|---|---|
| sample_id | string | Stable identifier |
| sample_type | string | solve · debug · optimize · explain · review (code) or the aerospace category |
| category | string | Fine-grained topic, e.g. dynamic_programming |
| difficulty | string | easy · medium · hard |
| question_text | string | Problem statement |
| verified_solution_code | string | Reference implementation (code platform only) |
| headline_answer | string or number | Correct answer or refusal code |
| reasoning_chain | string | Step-by-step derivation |
| provenance_hash | string | SHA-256 of the row |
| merkle_root | string | Batch root |
| merkle_proof | array | Inclusion path |
{
"ok": false,
"error": {
"code": "SCOPE_REQUIRED",
"message": "Streaming requires a full-scope key."
}
}| Code | Status | Description |
|---|---|---|
| UNAUTHORIZED | 401 | Missing or malformed Authorization header |
| INVALID_KEY | 401 | Key not found or revoked |
| EXPIRED_KEY | 401 | Key has passed its expiry date |
| NOT_APPROVED | 403 | Key not approved for data access |
| SCOPE_REQUIRED | 403 | Requires a full-scope key |
| UNKNOWN_MODEL | 404 | No platform with that id |
| NO_ROWS_FOR_TYPE | 404 | No rows match the requested sample_type |
| INVALID_SAMPLE_TYPE | 400 | Unknown sample_type value |
| INVALID_FORMAT | 400 | Unknown format value |
| RATE_LIMITED | 429 | Request rate exceeded |
| STORAGE_ERROR | 500 | Dataset file could not be read |
| DECRYPT_ERROR | 500 | Decryption failed |
| Scope | Requests / hour |
|---|---|
| sample | 20 |
| full | 100 |
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 98
X-RateLimit-Reset: 1790434800The API is versioned in the URL path. The current version is v1, and every endpoint lives under /api/v1.
Alrithm data is proprietary. Rows are served for training and evaluation use only. Redistribution, resale, or making the data available to third parties is prohibited.
Was this page helpful?