मीडिया निर्माण

POST /api/media/generate — images, video, TTS, music और 3D की asynchronous generation. Parameters model, prompt, opts. GET /api/media/jobs/{id} से poll करें।

Async media generation: images, video, voiceover (TTS), speech-to-text, music और 3D। आप एक task बनाते हैं और result को poll करते हैं। पूरी model सूची media-models catalog में है; webhooks, errors और billing webhook section में हैं।

POSThttps://getvibeapi.com/api/media/generate
GEThttps://getvibeapi.com/api/media/jobs/{id}

parameters बनाएँ

ParameterTypeविवरण
modelreq.stringएक media model नाम, जैसे veo-3.1 या gpt-image-2 (catalog देखें)।
promptreq.stringText description।
optsobjectअतिरिक्त generation options (model पर निर्भर): resolution, duration वगैरह।

बनाएँ और poll करें

बनाने पर 202 के साथ { ok: true, jobId, status: "processing" } मिलता है। जब तक status: "success" न हो, GET /api/media/jobs/{jobId} को poll करें, फिर resultUrls लें।

# 1. create a generation job
curl https://getvibeapi.com/api/media/generate \
  -H "Authorization: Bearer $GETVIBE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "veo-3.1",
    "prompt": "a cat on a skateboard, slow motion"
  }'
# → {"ok":true,"jobId":"...","status":"processing"}
Billing वास्तविक generation वॉल्यूम (resolution, duration) पर आधारित है। यदि model उपलब्ध नहीं है या request अस्वीकार हो जाती है, तो जवाब ok: false के साथ आता है और कोई शुल्क नहीं लगता। साइट पर दिखाई गई कीमतें indicative हैं; सटीक शुल्क हर स्वीकृत response के x-pv-cost-rub header में लौटाया जाता है। Stream bodies डिफ़ॉल्ट रूप से अपरिवर्तित रहते हैं; उस protocol के अंतिम usage event में लागत जोड़ने के लिए x-pv-cost: 1 भेजें।

उन्नत पैरामीटर (opts)

model और prompt के अलावा, आप opts में अतिरिक्त options दे सकते हैं। यह सेट model पर निर्भर करता है। पूरा machine-readable contract GET /api/model-capabilities से मिलता है (या किसी विशिष्ट model के लिए GET /api/model-capabilities/{model} से)।

आम तौर पर इस्तेमाल होने वाले advanced parameters
ParameterTypeविवरण
aspect_ratiostringAspect ratio: 1:1, 16:9, 9:16, 4:3, 3:4.
durationstring|numberVideo duration सेकंड में (5, 10, 15)।
resolutionstringResolution: 480p, 720p, 1080p, 4K.
image_urlstring (URL)I2V / image-to-image के लिए source image।
negative_promptstringgeneration से क्या बाहर रखना है (qwen-image, wan-2-7)।
guidancenumberGuidance scale — prompt adherence (flux-2, qwen-image, seedance)।
seednumberफिर से वही नतीजा पाने के लिए Seed (flux-2)।
stabilitynumberStability 0–1 (hailuo, happyhorse, seedance, TTS)।
camerastringCamera motion, जैसे "pan left" (kling-3.0, hailuo)।
first_frame_urlstring (URL)First frame for I2V (kling-3.0, wan-2-7).
last_frame_urlstring (URL)I2V के लिए अंतिम frame (seedance, kling-3.0, wan-2-7)।
reference_imagestring (URL)Style/character reference (happyhorse)।
similarity_boostnumberVoice similarity 0–1 (ElevenLabs TTS)।
speednumberSpeech rate 0.5–2 (ElevenLabs TTS)।
जब तक अन्यथा न कहा जाए, सभी parameters optional हैं। अज्ञात parameters को ignore किया जाता है। types, ranges और examples के साथ पूरी सूची GET /api/model-capabilities/{model} response में है।

आपकी अपनी files: link के बजाय base64

URL options (image_url, input_urls, mask_url और बाकी) वे links हैं जिन्हें provider fetch करता है, इसलिए ये केवल public https:// addresses स्वीकार करते हैं। उन fields में से किसी एक में inline data:image/...;base64,… string 400 के साथ reject होती है।

अपनी file भेजने के लिए, इसके बजाय matching *_base64 field का उपयोग करें: service bytes को store करती है, उन्हें publish करती है और परिणामी link provider को pass करती है। input_base64 में प्रति request 16 files तक।

इनलाइन फ़ाइलें
ParameterTypeविवरण
image_base64stringSource image। image_url की जगह लेता है।
mask_base64stringInpainting mask (केवल image/*)। mask_url को replace करता है।
input_base64string[]image-to-image और multi-input के लिए references। input_urls को बदल देता है।
audio_base64stringSource audio। audio_url की जगह लेता है।
video_base64stringस्रोत वीडियो। video_url की जगह लेता है।
मान पूरा data:image/png;base64,… string है, prefix सहित — file type उसी से पढ़ा जाता है।

अनुरोध अनुबंध: strict, quote_id, max_price_rub

POST /api/media/generate और POST /api/media/price एक ही body स्वीकार करते हैं, इसलिए आप इसे quote करके बिना बदलाव submit कर सकते हैं। कोई अन्य top-level field नहीं है: कोई अज्ञात field दोनों endpoints पर 400 के साथ अस्वीकार होता है और code unknown_field उसे नाम देता है (field, fields), strict के साथ या बिना। Generation parameters opts के अंदर जाते हैं।

शीर्ष-स्तरीय फ़ील्ड
ParameterTypeविवरण
modelreq.stringPublic model id या उसके किसी एक route (base:alias)।
promptstringText; ज़रूरी केवल तब है जब model operation इसे माँगता हो।
optsobjectModel options। सटीक schema: GET /v1/model-capabilities/{model} में operations[].requestJsonSchema।
strictbooleanसख्त मोड (या हेडर x-getvibe-strict: 1): ऐसा अनुरोध जो ठीक उसी तरह निष्पादित नहीं हो सकता जैसा लिखा गया है (कोई पैरामीटर हटा दिया जाए, किसी मान को सीमा के भीतर समायोजित किया जाए, या कोई कुंजी मॉडल के अनुबंध से बाहर हो), किसी भी मूल्य-अनुमान या शुल्क से पहले 422 strict_validation_failed और उल्लंघनों की सूची के साथ अस्वीकार कर दिया जाता है। दस्तावेज़ में उल्लिखित कोई फ़ील्ड जिसे मॉडल स्वीकार करता है और अनदेखा कर देता है (स्रोत की लंबाई वाले मॉडल पर duration), उल्लंघन नहीं है: वह param_ignored चेतावनी के रूप में वापस आता है।
quote_idstringPOST /api/media/price से mq_…। Job केवल उसी price पर चलता है; stale, used या re-routed quote कुछ भी run होने से पहले 409/422 के साथ refuse कर दिया जाता है।
max_price_rubnumberइस एक job के लिए account currency में ceiling। अगर quote इससे ज़्यादा है: 422 media_max_price_exceeded और कुछ भी run नहीं होता। metered job से इससे ऊपर कभी charge नहीं लिया जाता।
webhook_urlstringPublic https URL जो एक signed completion notification प्राप्त करता है।

id के अनुसार files (Files API)

कोई भी source file तीन तरीकों से भेजी जा सकती है: link के रूप में (image_url, audio_url, video_url…), inline bytes के रूप में (image_base64, audio_base64, video_base64…) या POST /v1/files से अपनी file के id के रूप में। id fields हर operation के requestJsonSchema में सूचीबद्ध हैं और strict mode में स्वीकार किए जाते हैं।

ParameterTypeविवरण
image_file_idstringimage_url के बजाय।
audio_file_idstringaudio_url के बजाय।
video_file_idstringvideo_url के बजाय।
mask_file_idstringmask_url के बजाय।
first_frame_file_id / last_frame_file_idstringInstead of first_frame_url / last_frame_url.
input_file_idsstring[]input_urls में append किया जाता है।
reference_*_file_idsstring[]Appended to reference_image_urls / reference_audio_urls / reference_video_urls.

Video की pricing input file की length के हिसाब से

जिन मॉडल का आउटपुट-लंबाई अपलोड किए गए ट्रैक पर निर्भर करती है — kling-ai-avatar, omnihuman-v2, omnihuman-2-0, omnihuman-v1.5, omnihuman-1-5, volcengine-lipsync (ऑडियो), kling-motion-control, wan-animate, topaz-video-upscale, p-video-edit (वीडियो), lipsync-2-pro, sync-3, react-1 (दोनों इनपुट) — उनके लिए /api/media/price और /api/media/generate पर max_price_rub की पूर्व-जांच सर्वर-साइड उस फ़ाइल (लिंक, data: URI, base64 या *_file_id) को मापती है और मापे गए सेकंड के आधार पर मूल्य निर्धारित करती है। उत्तर में sourceSeconds (लिप-सिंक के लिए outputSeconds) शामिल होता है, और estimateReason बताता है कि लंबाई मापी गई थी। यदि फ़ाइल पढ़ी नहीं जा सकती, तो मूल्य निर्धारण अपने पिछले आधार (एक सेकंड, कैटलॉग अनुमान या रूट की अधिकतम सीमा) पर ही रहता है और estimateReason इसका कारण बताता है। शुल्क प्रति-सेकंड दर × वास्तव में रेंडर किए गए सेकंड के बराबर होता है, और कभी भी max_price_rub से अधिक नहीं होता। इन मॉडल पर opts.duration स्वीकार किया जाता है और param_ignored चेतावनी के साथ अनदेखा कर दिया जाता है।

आवाज़ क्लोनिंग

POSThttps://getvibeapi.com/api/media/voices
GEThttps://getvibeapi.com/api/media/voices
POSThttps://getvibeapi.com/api/media/voices/{voice_id}/samples
DELETEhttps://getvibeapi.com/api/media/voices/{voice_id}

Create: { name, consent: true, engine, audio_url | audio_base64 } or several recordings samples: [{ audio_url } | { audio_base64 }, …] (engine: "elevenlabs" only). An ElevenLabs voice is used by voice-clone-tts and by the Voice Changer (elevenlabs-voice-changer). Appending recordings to an ElevenLabs voice is free. Every recording is downloaded and measured before the supplier is called: a refusal changes and charges nothing.

सीमाएँ और error codes
ParameterTypeविवरण
one recording≤ 10 MBwav/mp3, up to 60 s. Larger: 422 voice_sample_too_large / voice_sample_invalid.
recordings per voice≤ 25पहले से जोड़े गए को गिनें। और: 422 voice_samples_limit।
voice length≤ 300 sसभी recordings मिलाकर, उन्हें भी गिनते हुए जो पहले से जोड़ी जा चुकी हैं। अधिक लंबी: 422 voice_samples_limit; engine minimum से छोटी: 422 voice_samples_invalid।
recordings size≤ 50 MBएक request की सभी recordings मिलाकर। अधिक: 422 voice_samples_too_large।
request body≤ 70 953 644 Bbase64 में 50 MB recordings (×4/3) और JSON। इससे बड़ा: 413 payload_too_large (JSON, max_body_bytes के साथ)। लंबे sets को …/samples के ज़रिए parts में भेजें, या audio_url links के रूप में।
additions per 24 h20प्रति client. अधिक: 429 voice_samples_rate_limited.
Other answers: 404 voice_not_found (अज्ञात, हटाई गई या किसी अन्य account की voice), 409 voice_samples_unsupported (recordings केवल ElevenLabs voice में ही जोड़ी जा सकती हैं), 409 voice_slots_full, 502 voice_samples_failed (supplier ने recordings मानने से इनकार किया; voice अपरिवर्तित रहती है)। ElevenLabs voice का बिल मासिक होता है; prices GET /api/media/voices (pricing) में हैं।

Voice Changer और Forced Alignment

ParameterTypeविवरण
elevenlabs-voice-changermodelopts.voice_id (your ElevenLabs voice) + the source recording opts.audio_url | audio_base64 | audio_file_id, up to 5 minutes. Priced on the measured length: 1 minute = 1000 characters.
forced-alignmentmodelprompt is the transcript, opts.audio_url | audio_base64 | audio_file_id the recording. Result: word timings in resultMeta.words and an SRT file in resultUrls. Priced per 1000 characters of text.

सैंडबॉक्स: सबमिट परिणाम अज्ञात

जब supplier की start confirmation नहीं आती, तो job status: "submitting" के साथ stage: "submission_unknown", errorCode: "media_submission_uncertain" और failure.advice: "reconcile_first" में रहता है — उसी jobId को poll करते रहें और duplicate न बनाएँ। इस path को बिना किसी लागत के test करने के लिए, sandbox key और header x-pv-sandbox-outcome: submission_uncertain के साथ POST /api/media/generate भेजें। जवाब एक सामान्य 202 होता है जिसमें jobId होता है; उसे poll करने पर 60 सेकंड तक unknown submit के रूप में जवाब मिलता है, फिर ऐसे job के रूप में जो कभी शुरू ही नहीं हुआ (failure.code: "submission_not_started", charged: false)। कुछ भी store नहीं होता, किसी supplier को नहीं भेजा जाता और charge नहीं लगता। इस header के साथ एक regular key को 400 sandbox_outcome_requires_sandbox_key मिलता है।

वाक्-से-पाठ (प्रतिलेखन)

बाकी generation जैसा ही endpoint: model में STT model name डालें, prompt को empty string रहने दें, और opts.audio_url में recording pass करें। Transcript GET /api/media/jobs/{id} पर resultText में आता है; resultUrls खाली रहता है — transcription कोई file produce नहीं करता।

# speech-to-text: create the job, then read the transcript
curl https://getvibeapi.com/api/media/generate \
  -H "Authorization: Bearer $GETVIBE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "whisper-large-v3-turbo",
    "prompt": "",
    "opts": {
      "audio_url": "https://example.com/meeting.mp3",
      "language_code": "en"
    }
  }'
# → {"ok":true,"jobId":"JOB_ID","status":"processing","priceRub":0.03}

curl https://getvibeapi.com/api/media/jobs/JOB_ID \
  -H "Authorization: Bearer $GETVIBE_API_KEY"
# → {"status":"success","resultText":"the transcribed text…","resultUrls":[],"priceRub":0.03}

Models

  • whisper-large-v3-turbo — audio के प्रति minute $0.00025। सबसे सस्ता और सबसे तेज़, 99 languages।
  • nemotron-asr-multilingual — प्रति minute $0.00025। NVIDIA multilingual ASR, अपने आप punctuate करता है।
  • whisper-large-v3 — प्रति minute $0.000563। पूरा Whisper: turbo से धीमा, noisy audio पर अधिक सटीक।
  • universal-2 — प्रति minute $0.003125।
  • speech-to-text — प्रति minute $0.01 (ElevenLabs Scribe)। Speaker diarization और audio-event tags का समर्थन करता है।

Parameters

ParameterTypeविवरण
audio_urlreq.string (URL)Public https link जो फ़ाइल को सीधे serve करता है। Redirects और private network addresses अस्वीकार कर दिए जाते हैं। अगर फ़ाइल ऑनलाइन नहीं है तो इसके बजाय audio_base64 का उपयोग करें।
audio_base64stringRecording inline data के रूप में: data:audio/mpeg;base64,… यह audio_url की जगह लेता है।
language_codestringLanguage code (en, ru, …)। छोड़े जाने पर स्वतः पहचाना जाता है।
duration_minutesnumberरिकॉर्डिंग की अवधि मिनटों में — इसका उपयोग अग्रिम मूल्य अनुमान के लिए होता है। अंतिम शुल्क मापा जाता है (नीचे देखें)।
diarizebooleanSpeaker diarization (universal-2, speech-to-text)।
tag_audio_eventsbooleanहँसी या तालियों जैसे audio events को tag करें (speech-to-text)।
keytermsstring[]terms और names की hint list (speech-to-text; +30% मूल्य)।

Formats और limits

mp3, wav, m4a/mp4, flac, ogg/opus और webm स्वीकार किए जाते हैं। File size अधिकतम 25 MB है — 128 kbps mp3 का लगभग 26 मिनट, या opus में कई घंटे की speech। इससे बड़ा कुछ भी स्पष्ट message के साथ तुरंत अस्वीकार कर दिया जाता है और उस पर billing नहीं होती; इसके बजाय recording को split करें।

Billing ऑडियो के प्रति मिनट है। whisper-large-v3-turbo, whisper-large-v3 और nemotron-asr-multilingual के लिए अंतिम राशि रिकॉर्डिंग की मापी गई लंबाई से निकाली जाती है, जो transcript से ली जाती है — न कि उससे जो आपने duration_minutes में भेजा। न्यूनतम शुल्क एक kopeck है। सटीक राशि हमेशा पूर्ण job पर priceRub के रूप में लौटाई जाती है।

Readiness webhook (polling के बजाय)

Polling से बचने के लिए, अपने dashboard में एक address mediaWebhookUrl register करें। जब task पूरा होता है (success या error), तो service JSON body के साथ POST की पाँच delivery attempts तक करता है:

// POST to your mediaWebhookUrl when a job finishes
{
  "jobId": "...",
  "status": "success",            // or "fail"
  "model": "veo-3.1",
  "kind": "video",                // image | video | audio | music | 3d
  "resultUrls": ["https://getvibeapi.com/api/media/file/..."],
  "failMsg": null,
  "createdAt": "2026-06-17T10:00:00.000Z"
}
Delivery details, error codes और billing Webhook और media task lifecycle में हैं। संक्षेप में: webhook Standard Webhooks headers के साथ sign किया जाता है, duplicates संभव हैं, और पाँच असफल प्रयासों के बाद delivery रुक जाती है। Polling ही source of truth बना रहता है।

फ़ाइल fetch की जा रही है: /api/media/file/{id}/{idx}

GEThttps://getvibeapi.com/api/media/file/{id}/{idx}

Generation result URL (image, video, audio या 3D model) resultUrls से। इसे वैसे ही इस्तेमाल करें जैसे service लौटाती है: यह बिना API key के खुलता है और <img>, <video> या browser में काम करता है। Provider छिपा रहता है: upstream address server-side resolve होता है, client उसे कभी नहीं देखता।

Path और query parameters
ParameterTypeविवरण
idreq.string (path)/api/media/jobs/{id} response से Task id (jobId)।
idxreq.integer (path)Result index (0-based)। एक ही result के लिए — 0।
query paramsजैसा resultUrls मेंURL खुद न बनाएँ और service द्वारा लौटाए गए parameters को संशोधित न करें।
downloadstring (query)download=1 फ़ाइल को एक attachment के रूप में लौटाता है जिसका नाम और extension content का पालन करते हैं (3D model के लिए .glb)। इसके बिना फ़ाइल browser में खुलती है।
# The signed URL is returned in resultUrls of the /api/media/jobs/{id} response
# or in the webhook body. Opens directly in the browser / <img> — no key needed.
https://getvibeapi.com/api/media/file/JOB_ID/0?sig=HMAC_SIGNATURE
जॉब पूरा होने के बाद नतीजे 7 दिनों तक रखे जाते हैं (/api/media/jobs/{id} का resultsExpireAt फ़ील्ड)। तैयार फ़ाइल हमारे storage में कॉपी कर दी जाती है और resultUrls https://getvibeapi.com/media/r/… रूप के एक स्थायी पते पर स्विच हो जाते हैं; पहले लौटाया गया /api/media/file/… URL भी काम करता रहता है। दोनों Range requests को सपोर्ट करते हैं (video और audio में seeking)। 7 दिनों के बाद फ़ाइल हटा दी जाती है और URL कोड media_result_expired के साथ 410 Gone लौटाता है — जो चाहिए वह तब तक डाउनलोड कर लें।
GetVibe API मीडिया जनरेशन — छवि, वीडियो, ऑडियो, संगीत, 3D | GetVibe API