API models
Rivya API models list کریں، model IDs، categories، prompt limits، reference media، readiness states، اور Files API dependencies سمجھیں۔
2026/05/11 کو آخری review
Rivya models کو ان کی Public API readiness کے ساتھ list کرنے کے لیے GET /api/v1/models استعمال کریں۔
curl https://rivya.ai/api/v1/modelsیہ endpoint public اور read-only ہے۔ یہ وہی public model layer return کرتا ہے جو API docs اور online debugger استعمال کرتے ہیں، بشمول ایسے models جو ابھی fully callable نہیں ہیں۔
Response shape
Response یہ shape استعمال کرتا ہے:
{
"object": "list",
"data": [
{
"id": "z-image",
"display_name": "Z-Image",
"category": "image",
"runtime": "async_task",
"base_credits": 1,
"billing_type": "FIXED",
"supported_modes": ["text-to-image"],
"max_prompt_length": 1000,
"reference_media": null,
"params": [],
"api_status": "available",
"api_input_status": "available_text",
"supported_api_inputs": ["text"],
"requires_files_api": false,
"requires_upload_for_modes": [],
"url_input_supported": false,
"file_kinds": [],
"chat_capabilities": null,
"notices": []
}
]
}Asynchronous generation models کے لیے POST /api/v1/generations میں id کو model value کے طور پر استعمال کریں۔ Chat models کے لیے POST /api/v1/chat/completions استعمال کریں اور chat_capabilities check کریں۔
Availability states
Model reference یہ public states استعمال کرتا ہے:
available: کم از کم ایک Public API generation path available ہےcoming_soon: async generation model ہے، مگر فی الحال Public API کے ذریعے exposed نہیںstudio_only: model Studio یا کسی دوسرے product surface کے ذریعے available ہے، Public API v1 کے ذریعے نہیں
Input readiness field زیادہ specific ہے:
available_text: prompt-based requests کو directly test کیا جا سکتا ہےavailable_url_input: public URL یا scalar params کو directly test کیا جا سکتا ہےpartial_requires_files: کچھ modes upload کے بغیر call ہو سکتے ہیں؛ reference-media modes کو Files API استعمال کرنا چاہیےrequires_files_api: model uploaded reference media پر depend کرتا ہے جو/api/v1/filesکے ذریعے آتا ہے
Uploaded image، video، یا audio references مانگنے والے modes call کرنے سے پہلے Files API استعمال کریں۔
Chat models کے لیے chat_capabilities document کرتا ہے کہ Chat API non-streaming responses، streaming responses، web search، image file_id attachments، thoughts، اور reasoning effort support کرتی ہے یا نہیں۔
Model count policy
Public model list بدلتی رہتی ہے کیونکہ Rivya models add، remove، یا gate کرتا ہے۔
اپنی integration میں hard-coded model count پر rely نہ کریں۔ ہمیشہ /api/v1/models یا dynamic Model API Reference پڑھیں۔