Developers

Explore Wrongthinking models and the API for integrating predictions and simulations into your application.

API v1

API endpoints

  • GET/v1/models

    List models for integrations.

  • POST/v1/predictions

    Submit a prediction with its model and input.

  • GET/v1/predictions/:id

    Check the status and retrieve the result.

View all endpoints

Quickstart

Try a demand forecast with Chronos-2 using your credentials.

The API accepts one asynchronous job per request. The body includes the model ID and its input object. Send the key in Authorization from your server.

  1. POST /v1/predictionsSend the input and keep an idempotency key if you plan to retry.
  2. 202 AcceptedStore the ID and the result URL while the job runs.
  3. GET /v1/predictions/:idCheck the status and read the result when the prediction completes.

Example statuses queued → running → completed / failed.

If you receive 401, check the API key. If you receive 429, wait before retrying with the same idempotency key.

HTTP request
POST /v1/predictions HTTP/1.1Host: wrongthinking.comAuthorization: Bearer <API_KEY>Content-Type: application/jsonIdempotency-Key: <REQUEST_KEY> {  "model": "chronos2",  "input": {    "values": [12, 15, 17, 16, 19, 18, 20, 24, 22, 25, 26, 29],    "horizon": 2  }}

Authentication

Create a key in Studio → Developers → API keys. Store it on your server and send it in the Authorization header.

HTTP
Authorization: Bearer <API_KEY>

API reference

Check each model guide for inputs, Studio limits, and output format.

  • GET/v1/models

    List models for integrations.

  • POST/v1/predictions

    Submit a prediction with its model and input.

  • GET/v1/predictions/:id

    Check the status and retrieve the result.

  • POST/v1/batches

    Submit several inputs to one model.

  • GET/v1/batches/:id

    Check batch status and per-item results.

Callbacks

callback_url is an optional HTTPS URL on your server. The event reports the terminal status and includes a reference for retrieving the response.

prediction.completed
The prediction completed and the result can be fetched.
prediction.failed
The prediction failed. Check its status for the error.
batch.completed
The batch finished. Inspect each item, including when the batch status is partial.

When integrating, verify the signature before accepting the event, deduplicate by ID, and return 2xx after recording it. Compute HMAC-SHA256 using your signing secret as text and Wrongthinking-Timestamp + a dot + the raw body. Compare the hex digest with Wrongthinking-Signature after v1=. Retries follow the previous failure after 1, 5 and 15 minutes.

Prediction event
{  "id": "evt_demo_001",  "type": "prediction.completed",  "data": {    "id": "pred_demo_001",    "model": "chronos2",    "status": "completed",    "result_url": "/v1/predictions/pred_demo_001"  }}
Batch processing

Group inputs for the same model under items. Give each input a unique custom_id to match results even when processing finishes out of order.

  1. POST /v1/batchesValidate each input. Split work across batches when the total size or item count exceeds its limit.
  2. GET /v1/batches/:idCheck the status of each item. A batch can contain successes and failures.
  3. custom_idStore successful results and assemble another batch with the items eligible for retry.

Each batch accepts 1–8 items, 512 KiB of JSON and 3 MiB of images combined. Up to two predictions run concurrently per account.

Batch request
POST /v1/batches HTTP/1.1Host: wrongthinking.comAuthorization: Bearer <API_KEY>Content-Type: application/jsonIdempotency-Key: <REQUEST_KEY> {  "model": "chronos2",  "items": [    {      "custom_id": "case-01",      "input": {        "values": [12, 15, 17, 16, 19, 18, 20, 24, 22, 25, 26, 29],        "horizon": 2      }    },    {      "custom_id": "case-02",      "input": {        "values": [12, 15, 17, 16, 19, 18, 20, 24, 22, 25, 26, 29],        "horizon": 2      }    }  ]}

Models

Find a model by analysis type. Each guide includes its ID, fields, and API examples.

API pricing

Loading rates…

View Studio plans

Developers in Studio

Sign in to open the Developers area of your account.