AlrithmAPI Reference · v1
API Reference·8 min read·Updated Oct 2026

Documentation

One streaming endpoint per platform. Every row arrives already formatted for training.

Introduction

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:

PlatformidContent
ALR Code Platformalr-code-platformVerified reasoning traces for code: algorithm solutions, debugging, optimization, explanation, and review.
ALR Aerospace Platformalr-aerospace-platformVerified reasoning traces for orbital mechanics, propulsion, atmosphere, guidance, and related computations.

Base URL: https://alrithmapi.vercel.app/api/v1

Quickstart

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.jsonl

Swap alr-code-platform for alr-aerospace-platform to pull the aerospace corpus instead. See Available models for the full list.

Authentication

Every request to a data endpoint includes an API key in the Authorization header using the Bearer scheme.

Authorization: Bearer sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Scopes

Each key carries a scope that determines which endpoints it can access.

ScopeAccessUse case
samplePreview endpoints onlyEvaluating row format
fullStreaming + all data endpointsProduction training
Keys are shown once. The full key is revealed exactly once, at creation. If you lose it, revoke and create a new one.

Datasets

A platform is a group of datasets that share a common domain and are served from one streaming URL. Two platforms are published:

PlatformidCategories
ALR Code Platformalr-code-platformsolve, debug, optimize, explain, review
ALR Aerospace Platformalr-aerospace-platformpropulsion_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.

List datasets

GET/api/v1/models

Returns every published platform. No authentication required.

$ curl https://alrithmapi.vercel.app/api/v1/models
Response
{
  "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.

Retrieve rows

GET/api/v1/models/{id}/data

Streams every row of the platform as newline-delimited JSON. Requires a full-scope key.

Query parameters

NameTypeDescription
formatstringOutput shape. raw, openai, or completion. Defaults to raw.
sample_typestringFilter 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.jsonl
The response includes an X-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.
The response is 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.

Formats

The format parameter transforms each row on the way out. Same data, different shapes.

openai

Response
{
  "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

Response
{
  "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.

Row schema

FieldTypeDescription
sample_idstringStable identifier
sample_typestringsolve · debug · optimize · explain · review (code) or the aerospace category
categorystringFine-grained topic, e.g. dynamic_programming
difficultystringeasy · medium · hard
question_textstringProblem statement
verified_solution_codestringReference implementation (code platform only)
headline_answerstring or numberCorrect answer or refusal code
reasoning_chainstringStep-by-step derivation
provenance_hashstringSHA-256 of the row
merkle_rootstringBatch root
merkle_proofarrayInclusion path

Error codes

Response
{
  "ok": false,
  "error": {
    "code": "SCOPE_REQUIRED",
    "message": "Streaming requires a full-scope key."
  }
}
CodeStatusDescription
UNAUTHORIZED401Missing or malformed Authorization header
INVALID_KEY401Key not found or revoked
EXPIRED_KEY401Key has passed its expiry date
NOT_APPROVED403Key not approved for data access
SCOPE_REQUIRED403Requires a full-scope key
UNKNOWN_MODEL404No platform with that id
NO_ROWS_FOR_TYPE404No rows match the requested sample_type
INVALID_SAMPLE_TYPE400Unknown sample_type value
INVALID_FORMAT400Unknown format value
RATE_LIMITED429Request rate exceeded
STORAGE_ERROR500Dataset file could not be read
DECRYPT_ERROR500Decryption failed

Rate limits

ScopeRequests / hour
sample20
full100
Response
X-RateLimit-Limit:     100
X-RateLimit-Remaining: 98
X-RateLimit-Reset:     1790434800

Versioning

The API is versioned in the URL path. The current version is v1, and every endpoint lives under /api/v1.

Confidentiality

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?