डेवलपर

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.

  1. POST /v1/predictionsइनपुट भेजें। दोबारा कोशिश करने की ज़रूरत हो सकती है, तो एक आइडेम्पोटेंसी कुंजी संभाल कर रखें।
  2. 202 Acceptedप्रोसेसिंग के दौरान ID और नतीजे का URL संभाल कर रखें।
  3. GET /v1/predictions/:idस्थिति देखें और अनुमान पूरा होने पर नतीजा पढ़ें।

स्थिति के उदाहरण queued → running → completed / failed.

401 मिलने पर API कुंजी जाँचें। 429 मिलने पर थोड़ी देर रुकें और उसी आइडेम्पोटेंसी कुंजी के साथ फिर कोशिश करें।

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

प्रमाणीकरण

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 संदर्भ

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 दें।

  1. POST /v1/batchesहर इनपुट की वैधता जाँचें। कुल आकार या आइटमों की संख्या सीमा से ज़्यादा हो तो काम को कई बैचों में बाँटें।
  2. GET /v1/batches/:idहर आइटम की स्थिति देखें। एक ही बैच में कुछ आइटम सफल और कुछ विफल हो सकते हैं।
  3. 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 की कीमतें

कीमतें लोड हो रही हैं…

स्टूडियो के प्लान देखें

स्टूडियो का डेवलपर सेक्शन

अपने खाते में डेवलपर सेक्शन खोलने के लिए साइन इन करें।