المطوّرون
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احتفظ بالمعرّف وعنوان 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تحقّق من صلاحية كل مدخل. قسّم العمل على دفعات إذا تجاوز الحجم الإجمالي أو عدد العناصر الحد المسموح.GET /v1/batches/:idتحقّق من حالة كل عنصر. قد تحتوي الدفعة الواحدة على عناصر ناجحة وأخرى فاشلة.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
جارٍ تحميل الأسعار…
عرض خطط الاستوديوقسم المطوّرين في الاستوديو
سجّل الدخول لفتح قسم المطوّرين في حسابك.
- نظرة عامةنقطة البداية لقسم المطوّرين في الاستوديو.
- النماذجالفهرس والأدلة التقنية والأسعار حسب النموذج.
- مفاتيح APICreate and revoke integration keys.
- الاستخدامDaily requests, errors, and accepted predictions.
- تكاليف APIسجل خاص بالتكاليف التقديرية لعمليات التشغيل في الاستوديو.
- الطلباتView request history and HTTP responses.
- السجلاتReview job outcomes and callback deliveries.
- الوثائقAuthentication and examples of the API.