Rivya Journal

Rivya API क्या है?

समझें कि Rivya API क्या है, कब फिट बैठती है, Studio से इसका रिश्ता क्या है, और Rivya models पर build करने से पहले कौन से API docs पढ़ने चाहिए।
उत्पाद
प्रकाशित 2026/05/12अंतिम समीक्षा 2026/05/12लेखक:Rivya उत्पाद टीम
Rivya API कवर, जिसमें product teams model requests, account credits, task status, chat sessions, files और webhooks को जोड़ते दिखते हैं।

Rivya API वह developer path है जिससे आप अपने product, script या workflow से Rivya model capabilities इस्तेमाल कर सकते हैं।

यह Rivya Studio से अलग product नहीं है। यह वही account boundary, वही credit wallet और वही public model layer इस्तेमाल करता है जो users को Rivya में दिखती है। फर्क यह है कि काम कैसे शुरू होता है: Studio में click करने के बजाय आपका application API key के साथ requests भेजता है।

अगर आपको endpoint details चाहिए, तो Rivya API Overview और Rivya API Quickstart से शुरू करें। यह article product-level explanation है: API किसलिए है, कहां फिट होती है, और कब इसे पहला रास्ता नहीं बनाना चाहिए।

Short version

Rivya API v1 signed-in account को API keys create करने और web interface के बाहर से Rivya model capabilities call करने देती है।

Current API surface में शामिल है:

  • API model list से model discovery
  • asynchronous image, video और audio generation jobs
  • reference media चाहने वाले models के लिए Files API uploads
  • public task IDs के साथ generation status polling
  • account credit checks
  • Chat API turns, optional SSE streaming सहित
  • generation completion के लिए signed webhooks
  • client wrapper चाहने वाली teams के लिए TypeScript SDK beta

Public developer hub Developers है। अगर आपको guided overview, API key settings के links और safe debugger flow चाहिए, तो यह सबसे अच्छा entry point है।

Rivya के पास API क्यों है

जब कोई व्यक्ति अभी models चुन रहा हो, prompts shape कर रहा हो, outputs review कर रहा हो और next step तय कर रहा हो, Studio उपयोगी है।

API तब उपयोगी है जब वह decision repeatable product या operational workflow बन चुका हो।

Common examples:

  • user brief submit करने के बाद product image variations generate करना चाहता है
  • marketing workflow structured campaign inputs से visual drafts बनाना चाहता है
  • internal tool browser खुलवाए बिना video या audio jobs submit करना चाहता है
  • support या content system अपने interface में chat model turn चाहता है
  • backend service generation jobs finish होने पर signed callbacks चाहता है

इन cases में Rivya API काम को same Rivya account से जुड़ा रखती है, billing, model selection और task status के लिए separate stack बनवाने के बजाय।

API क्या replace नहीं करती

API Rivya को सीधे इस्तेमाल करने की हर वजह replace नहीं करती।

Studio या public work surfaces इस्तेमाल करें जब:

  • prompt को अभी human exploration चाहिए
  • model choice stable नहीं है
  • creator को outputs visually compare करने हैं
  • project saved history और manual review पर निर्भर है
  • team ने तय नहीं किया कि कौन सा input और output format repeatable बनना चाहिए

जब workflow automate करने लायक साफ़ हो जाए, तब API इस्तेमाल करें।

यह boundary मायने रखती है। Vague creative question आम तौर पर पहले Studio में रहना चाहिए। Predictable inputs वाला known product flow API में move हो सकता है।

Main building blocks

API को छह connected pieces की तरह सोचें।

Building blockयह क्या handle करता हैआगे कहां पढ़ें
API keysआपके account से server-to-server accessAPI Authentication
ModelsPublic model IDs और readiness informationAPI Models
GenerationsAsync image, video और audio jobsCreate Generation
FilesReference image, video या audio uploadsFiles API
ChatNon-streaming या streaming chat turnsChat API
WebhooksGeneration jobs के signed completion eventsAPI Webhooks

Request और response shape के लिए API docs source हैं। यह article आपको यह तय करने में मदद करता है कि पहले कौन सा piece चाहिए।

Credits कैसे काम करते हैं

API usage Studio की तरह same Rivya account credit wallet से draw करता है।

इसका मतलब है कि API anonymous model proxy नहीं है। Request किसी Rivya account से belong करती है, उस account से created API key इस्तेमाल करती है, और API Credits में बताई product-level credit boundary follow करती है।

Teams के लिए यह उपयोगी है क्योंकि Studio experiments और API usage एक operational model में रहते हैं। आप model manually test कर सकते हैं, फिर repeatable part को second billing layer बनाए बिना integration में move कर सकते हैं।

Files कैसे fit होती हैं

कुछ models सिर्फ text से run कर सकते हैं। दूसरे models को reference image, video या audio file चाहिए।

API integrations में ये references Files API से जाने चाहिए। Upload managed file record create करता है जिसे supported model parameters में pass किया जा सकता है।

Practical rule सरल है:

  • अगर model text-only input accept करता है, तो generation endpoint से शुरू करें
  • अगर model को reference media चाहिए, तो पहले file upload करें
  • अगर model chat model है और image attachments चाहिए, तो Chat API और file IDs इस्तेमाल करें

अपनी integration को browser-only upload flows या saved Studio sessions के आसपास design न करें। API की अपनी public file boundary इसी वजह से है।

Webhooks कहां मदद करते हैं

Polling सबसे आसान first integration path है। Generation job submit करें, public task ID save करें, और success या failure तक poll करें।

जब integration ज्यादा production-like हो, तब Webhooks उपयोगी होते हैं:

  • आप हर job के लिए worker polling नहीं चाहते
  • app को generation finish होने पर record update करना है
  • आपको safely retry हो सकने वाला signed event चाहिए
  • failed jobs को clear recovery path में जाना है

Signed event contract के लिए API Webhooks इस्तेमाल करें। Webhook receiver narrow रखें: signatures verify करें, duplicate events handle करें, और secret values को logs में डालने से बचें।

अच्छा पहला API project

सबसे अच्छा पहला API project आम तौर पर छोटा और concrete होता है।

उदाहरण के लिए:

  1. settings में API key create करें
  2. model list call करें
  3. एक available model चुनें
  4. idempotency key के साथ एक generation job submit करें
  5. status endpoint poll करें
  6. before और after credits check करें
  7. उसके बाद ही Files API, Chat API या Webhooks add करें

यह path पहली test में हर API feature मिलाए बिना working integration देता है।

कब API wrong starting point है

API शायद सही पहला step नहीं है जब:

  • team ने अभी model family नहीं चुनी है
  • desired output हर run में बदल रहा है
  • prompt manual taste और review पर निर्भर है
  • integration credit usage उन लोगों से छिपा देगा जिन्हें उसे समझना चाहिए
  • product को automation से पहले public demo चाहिए

इन cases में Image, Video, Audio, Chat, या AI Models से शुरू करें। Path repeatable होने के बाद stable part को API में move करें।

आगे कहां जाएं

Explore जारी रखें

और पोस्ट

Rivya team से related guides, product notes और workflow breakdowns पढ़ना जारी रखें।

Loop में रहें

अगला workflow, model note या product update सीधे अपने inbox में पाएं

क्रिएटर्स के लिए concise newsletter, जो practical ideas, sharper taste और कम throwaway updates चाहते हैं।

New model launches और feature dropsछोटे workflow ideas जिन्हें आप जल्दी apply कर सकते हैं

Spam नहीं। कभी भी unsubscribe करें।