Rivya AI दस्तावेज़
मॉडल API पेज

Grok Imagine Video API इंटीग्रेशन

Rivya Public API v1 के जरिए मॉडल id grok-imagine-video, समर्थित इनपुट, पैरामीटर, Files API नियम, क्रेडिट और रिस्पॉन्स उदाहरणों के साथ Grok Imagine Video का उपयोग करें।

API से उपलब्धटेक्स्ट या URL तैयार; संदर्भ mode में Files API का उपयोग होता हैवीडियो
API मॉडल id

grok-imagine-video

इनपुट

text, file

Files API

संदर्भ mode के लिए जरूरी

बेस क्रेडिट

10

क्षमता

वीडियो

बिलिंग

FIXED

प्रॉम्प्ट सीमा

5000 अक्षर

रिक्वेस्ट अनुबंध

मॉडल id को शीर्ष स्तर पर भेजें। मॉडल के लिए खास कंट्रोल params में रखें।

Keyप्रकारजरूरीडिफॉल्टविवरण
modelstringहांgrok-imagine-videogrok-imagine-video API मॉडल id का उपयोग करें।
promptstringहां-इस मॉडल के लिए अधिकतम 5000 अक्षर।
paramsobjectनहीं-मॉडल के लिए खास पैरामीटर ऑब्जेक्ट। अनुमत keys के लिए नीचे दी गई पंक्तियां देखें।
client_request_idstringनहीं-अपने सिस्टम में रिक्वेस्ट ट्रेस करने के लिए वैकल्पिक client-side id।

मॉडल पैरामीटर

Keyप्रकारजरूरीडिफॉल्टसीमाविकल्पविवरण
modeselectनहींnormal-fun, normal, spicyजनरेशन मोड
durationnumberनहीं6min 6 / max 30 / step 1-अवधि
resolutionselectनहीं480p-480p, 720pरिजॉल्यूशन
aspect_ratioselectनहीं2:3-1:1, 16:9, 9:16, 2:3, 3:2आस्पेक्ट रेशियो

अपलोड नीति

पहले संदर्भ फाइल अपलोड करें, फिर लौटे हुए URL और duration token को params.referenceMediaItems में रखें।

संदर्भ नियम

संदर्भ इमेज: इमेज प्रोजेक्ट के लिए अधिकतम 1 इमेज फाइल अपलोड करें।

अधिकतम फाइलें

1

स्वीकार्य फाइल प्रकार

image

अवधि token

अवधि सत्यापन जरूरी होने पर वीडियो और ऑडियो संदर्भों में /api/v1/files से मिला durationToken होना चाहिए।

kindअधिकतम आकारMIME प्रकार
image10 MBimage/jpeg, image/png, image/webp

न्यूनतम रिक्वेस्ट

{
  "model": "grok-imagine-video",
  "prompt": "A cinematic product reveal with smooth camera movement",
  "params": {
    "mode": "normal",
    "duration": 6,
    "resolution": "480p",
    "aspect_ratio": "2:3"
  }
}

संदर्भ फाइल रिक्वेस्ट

{
  "model": "grok-imagine-video",
  "prompt": "A cinematic product reveal with smooth camera movement",
  "params": {
    "mode": "normal",
    "duration": 6,
    "resolution": "480p",
    "aspect_ratio": "2:3",
    "referenceMediaItems": [
      {
        "url": "https://cdn.example.com/reference-image.png",
        "kind": "image",
        "name": "reference-image.png",
        "mimeType": "image/png"
      }
    ]
  }
}

रिस्पॉन्स बनाएं

Create एंडपॉइंट सार्वजनिक टास्क id लौटाता है। टास्क सफल या विफल होने तक स्टेटस एंडपॉइंट पोल करें।

{
  "id": "task_grok_imagine_video_example",
  "status": "queued",
  "model": "grok-imagine-video",
  "reserved_credits": 10,
  "final_credits": 0,
  "created_at": "2026-05-11T00:00:00.000Z",
  "updated_at": "2026-05-11T00:00:00.000Z",
  "result": null,
  "error": null
}

सामान्य त्रुटियां

validation_failed, insufficient_credits, idempotency_conflict, rate_limited, not_found

कुछ mode में Files API संदर्भ अपलोड जरूरी हैं।