開発者向け
Explore Wrongthinking models and the API for integrating predictions and simulations into your application.
API v1
API エンドポイント
- GET
/v1/models統合に利用できるモデルのカタログを取得します。
- POST
/v1/predictionsモデルと入力オブジェクトを指定して予測をリクエストします。
- GET
/v1/predictions/:idステータスを確認し、結果を取得します。
クイックスタート
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.
POST /v1/predictions入力を送信します。再試行する可能性がある場合は、冪等性キーを保存してください。202 Accepted処理中は ID と結果の URL を保存しておきます。GET /v1/predictions/:idステータスを確認し、予測の完了後に結果を取得します。
ステータスの例 queued → running → completed / failed.
401 が返ったら API キーを確認してください。429 が返ったら、時間をおいて同じ冪等性キーで再試行してください。
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 }}認証
Create a key in Studio → Developers → API keys. Store it on your server and send it in the Authorization header.
Authorization: Bearer <API_KEY>API リファレンス
Check each model guide for inputs, Studio limits, and output format.
- GET
/v1/models統合に利用できるモデルのカタログを取得します。
- POST
/v1/predictionsモデルと入力オブジェクトを指定して予測をリクエストします。
- GET
/v1/predictions/:idステータスを確認し、結果を取得します。
- POST
/v1/batches同じモデルに複数の入力を送信します。
- GET
/v1/batches/:idバッチのステータスと各項目の結果を確認します。
コールバック
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
- 予測が完了し、結果を取得できます。
- prediction.failed
- 予測に失敗しました。エラーの内容はステータスを確認してください。
- batch.completed
- バッチが終了しました。一部成功の場合も、すべての項目を確認してください。
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.
{ "id": "evt_demo_001", "type": "prediction.completed", "data": { "id": "pred_demo_001", "model": "chronos2", "status": "completed", "result_url": "/v1/predictions/pred_demo_001" }}バッチ処理
同じモデルへの入力を items にまとめます。処理順が異なっても結果を対応づけられるよう、入力ごとに一意の custom_id を設定してください。
POST /v1/batches入力を1件ずつ検証します。合計サイズや件数が上限を超える場合は、複数のバッチに分けます。GET /v1/batches/:id各項目のステータスを確認します。1つのバッチに成功と失敗が混在することがあります。custom_id成功した結果を保存し、再試行できる項目だけを新しいバッチにまとめます。
Each batch accepts 1–8 items, 512 KiB of JSON and 3 MiB of images combined. Up to two predictions run concurrently per account.
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 } } ]}モデル
Find a model by analysis type. Each guide includes its ID, fields, and API examples.
視覚的注意
API 料金
料金を読み込み中…
Studio のプランを見るStudio の開発者向けエリア
ログインしてアカウントの開発者向けエリアを開きます。
- 概要Studio の開発者向けエリアの入口です。
- モデルモデルカタログ、技術ガイド、モデルごとの料金です。
- API キーCreate and revoke integration keys.
- 使用量Daily requests, errors, and accepted predictions.
- API コストStudio での実行にかかる推定費用の非公開履歴です。
- リクエストView request history and HTTP responses.
- ログReview job outcomes and callback deliveries.
- ドキュメントAuthentication and examples of the API.