Pengembang

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

API v1

Endpoint API

  • GET/v1/models

    Lihat katalog model untuk integrasi.

  • POST/v1/predictions

    Kirim permintaan prediksi beserta model dan objek masukannya.

  • GET/v1/predictions/:id

    Periksa status dan ambil hasilnya.

Lihat semua endpoint

Mulai cepat

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/predictionsKirim masukan. Simpan kunci idempotensi jika Anda berencana mencoba lagi.
  2. 202 AcceptedSimpan ID dan URL hasil selama tugas diproses.
  3. GET /v1/predictions/:idPeriksa status dan baca hasil setelah prediksi selesai.

Contoh status queued → running → completed / failed.

Jika menerima 401, periksa kunci API. Jika menerima 429, tunggu sebelum mencoba lagi dengan kunci idempotensi yang sama.

Permintaan HTTP
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  }}

Autentikasi

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>

Referensi API

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

  • GET/v1/models

    Lihat katalog model untuk integrasi.

  • POST/v1/predictions

    Kirim permintaan prediksi beserta model dan objek masukannya.

  • GET/v1/predictions/:id

    Periksa status dan ambil hasilnya.

  • POST/v1/batches

    Kirim beberapa masukan ke model yang sama.

  • GET/v1/batches/:id

    Periksa status batch dan hasil setiap item.

Callback

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
Prediksi selesai dan hasilnya dapat diambil.
prediction.failed
Prediksi gagal. Periksa statusnya untuk melihat kesalahan.
batch.completed
Batch selesai. Periksa setiap item meskipun status batch menunjukkan keberhasilan sebagian.

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.

Peristiwa prediksi
{  "id": "evt_demo_001",  "type": "prediction.completed",  "data": {    "id": "pred_demo_001",    "model": "chronos2",    "status": "completed",    "result_url": "/v1/predictions/pred_demo_001"  }}
Pemrosesan batch

Kelompokkan masukan bagi model yang sama di items. Berikan custom_id unik untuk setiap masukan agar hasil dapat dicocokkan meski urutan pengerjaan berbeda.

  1. POST /v1/batchesValidasi setiap masukan. Bagi pekerjaan menjadi beberapa batch jika ukuran total atau jumlah item melampaui batas.
  2. GET /v1/batches/:idPeriksa status setiap item. Satu batch dapat memuat item yang berhasil maupun gagal.
  3. custom_idSimpan hasil yang berhasil dan buat batch baru hanya untuk item yang layak dicoba kembali.

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

Permintaan batch
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      }    }  ]}

Model

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

Harga API

Memuat harga…

Lihat paket Studio

Bagian Pengembang di Studio

Masuk untuk membuka bagian Pengembang di akun Anda.