वीडियो, चित्र और संगीत generation
NordRouter providers को एक asynchronous flow में जोड़ता है: model, mode और inputs भेजें, job ID लें और result URLs पढ़ें।
- Catalog का public ID ही उपयोग करें।
- Aspect ratio, duration, resolution, audio और reference image model पर निर्भर हैं।
- Price और retention catalog तथा estimate response में हैं।
पूरे उदाहरण
मूल गाइड के सभी चलने योग्य उदाहरण नीचे सुरक्षित रखे गए हैं। केवल अपने टूल और ऑपरेटिंग सिस्टम से संबंधित ब्लॉक चलाएँ।
bash
curl https://nordrouter.com/media/generate \
-H "Authorization: Bearer sk-nr-YOUR-KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "image/nano-banana-2",
"input": { "prompt": "a cozy cabin in a winter forest, watercolor", "resolution": "2K" }
}'json
{ "id": "beefb531-…", "model": "image/nano-banana-2", "status": "processing",
"poll": "https://nordrouter.com/media/job/beefb531-…" }bash
curl https://nordrouter.com/media/job/beefb531-…json
{ "id": "beefb531-…", "status": "done",
"result_url": "https://nordrouter.com/media/file/beefb531-…",
"cost_usd": 0.052, "error": null }bash
curl https://nordrouter.com/media/generate \
-H "Authorization: Bearer sk-nr-YOUR-KEY" -H "Content-Type: application/json" \
-d '{
"model": "image/nano-banana-2",
"input": { "prompt": "…" },
"callback_url": "https://your-server.com/webhooks/nordrouter",
"callback_secret": "your-secret"
}'json
{ "event": "media.completed", "id": "beefb531-…", "status": "done",
"result_url": "https://nordrouter.com/media/file/beefb531-…", "cost_usd": 0.052, "error": null }python
import hmac, hashlib
expected = "sha256=" + hmac.new(secret.encode(), raw_body, hashlib.sha256).hexdigest()
assert hmac.compare_digest(expected, request.headers["X-NR-Signature"])json
{ "models": [
{ "id": "image/nano-banana-2", "type": "image",
"fields": [ {"name":"prompt","type":"textarea"}, {"name":"resolution","type":"select","options":["1K","2K","4K"]} ],
"est_usd": 0.052 }
], "retention_days": 14 }आधिकारिक दस्तावेज़ और लिंक
| Type | Family | Modes | ≈ price |
|---|---|---|---|
| 🖼 Images | Nano Banana / 2 / Pro (image/nano-banana*) | text→image, edit, up to 4K | from $0.025 |
| 🖼 | Imagen 4 Fast / Ultra (image/imagen4*) | text→image | from $0.025 |
| 🖼 | GPT Image 1.5 / 2 (image/gpt-image-*) | text→image, edit, up to 4K | from $0.025 |
| 🖼 | Flux 2 Pro / Flex (image/flux2-*) | text→image, edit | from $0.03 |
| 🖼 | Seedream v4 / 4.5 / 5 Lite (image/seedream-*) | text→image, edit | from $0.04 |
| 🖼 | Ideogram v3 / Character (image/ideogram-*) | text, remix, character | from $0.02 |
| 🖼 | Qwen / Wan Image / Grok / Z-Image | text→image, edit | from $0.01 |
| 🛠 Utils | Topaz / Recraft (image/*upscale*, image/recraft-remove-bg) | upscale up to 8K, background removal | from $0.01 |
| 🎬 Video | Veo 3.1 Lite / Fast / Quality (video/veo-3.1-*) | text/image→video | from $0.19 |
| 🎬 | Kling 2.1 → 3.0 (video/kling-*) | text/image→video, motion, avatars, up to 4K & 15s | from $0.16 |
| 🎬 | Wan 2.2 → 2.7 (video/wan-*) | text/image/video→video, speech-to-video | from $0.25 |
| 🎬 | Seedance 1.5 / 2 / Fast / Mini (video/seedance-*) | text/image→video, up to 4K, audio | from $0.06 |
| 🎬 | Hailuo 02 / 2.3 (video/hailuo-*) | text/image→video | from $0.08 |
| 🎬 | HappyHorse 1.0 / 1.1 (video/happyhorse-*) | text/image/reference→video, video edit | from $0.70 |
| 🎬 | Grok Video / 1.5 (video/grok-*) | text/image→video, up to 30s | from $0.06 |
| 🎬 | Gemini Omni (video/gemini-omni) | video with audio, up to 4K | from $0.39 |
| 🗣 Avatars | Kling Avatar, OmniHuman, InfiniteTalk, Lip Sync | photo+audio→talking video | from $0.19 |
| 🎵 Music | Suno V4–V5.5 (music/suno-v5) | text/style→2 tracks | ~$0.08 |
| 🎙 Speech | ElevenLabs Turbo / Multilingual (audio/elevenlabs-*) | text→speech, vocal isolation | from $0.04 / 1000 chars |
संबंधित गाइड
पहले न्यूनतम text request से कनेक्शन जाँचें, फिर streaming, tool calls, images और दूसरी advanced सुविधाएँ जोड़ें। API key को public code या browser frontend में कभी न रखें।