Developer API
Video API
Queue AI video jobs, track generation status, repurpose long videos into clips, and run studio tools for images, audio, lipsync, edits, and ads.
#Create jobs
Start long-running video generation and repurpose jobs. Create requests should include Idempotency-Key.
curl -X POST https://api.grik.io/api/v1/generate/video \
-H "Authorization: Bearer GRIK_API_KEY" \
-H "Idempotency-Key: video_job_123" \
-H "Content-Type: application/json" \
-d '{
"model": "kling",
"task_type": "multi-image2video",
"prompt": "A cinematic product reveal on a black reflective table",
"aspect_ratio": "16:9",
"duration": "5s",
"mode": "standard",
"sound": "on",
"image_list": [
{"image": "BASE64_IMAGE_1"},
{"image": "BASE64_IMAGE_2"}
]
}'| Method | Endpoint | Auth | Scope | Audience | Description |
|---|---|---|---|---|---|
| GET | /rico/workflows | API key | rico.media or video | Developers | List RICO Supercomputer recipes and allowlisted executor workflows for web, MCP, CLI, and API use. |
| GET | /rico/recipes | API key | rico.media or video | Developers | List RICO Supercomputer recipes only. |
| POST | /rico/sessions | API key | rico.media or video | Developers | Create a RICO Supercomputer session with brief, recipe, inputs, cost estimate, messages, and pending steps. |
| POST | /rico/sessions/:id/approve | API key | rico.media or video | Developers | Approve a RICO Supercomputer session, deduct RICO media credits, and queue deterministic execution. |
| POST | /rico/mcp | API key | rico.media or video | Developers | Call the RICO MCP endpoint with tools such as rico_estimate_cost, rico_apply_effect, rico_repurpose, and rico_get_job. |
| POST | /generate/video | API key | video | Developers | Start text-to-video or image-to-video generation with model, aspect ratio, duration, mode, image URL, and sound options.Send Idempotency-Key for user-triggered create/retry requests. |
| POST | /kling/videos/effects | API key | video | Developers | Queue a Kling Video Effects Center task by effect_scene with single-image or dual-image input. |
| POST | /kling/lipsync | API key | video | Developers | Queue Kling advanced lip-sync and track it through the provider task registry. |
| POST | /kling/multi-elements | API key | video | Developers | Queue a Kling multi-elements video editing task. |
| POST | /repurpose | API key | video | Developers | Start a repurposing pipeline from a YouTube or file URL with optional language.Send Idempotency-Key for user-triggered create/retry requests. |
/rico/workflowsList RICO Supercomputer recipes and allowlisted executor workflows for web, MCP, CLI, and API use.
/rico/recipesList RICO Supercomputer recipes only.
/rico/sessionsCreate a RICO Supercomputer session with brief, recipe, inputs, cost estimate, messages, and pending steps.
/rico/sessions/:id/approveApprove a RICO Supercomputer session, deduct RICO media credits, and queue deterministic execution.
/rico/mcpCall the RICO MCP endpoint with tools such as rico_estimate_cost, rico_apply_effect, rico_repurpose, and rico_get_job.
/generate/videoStart text-to-video or image-to-video generation with model, aspect ratio, duration, mode, image URL, and sound options.Send Idempotency-Key for user-triggered create/retry requests.
/kling/videos/effectsQueue a Kling Video Effects Center task by effect_scene with single-image or dual-image input.
/kling/lipsyncQueue Kling advanced lip-sync and track it through the provider task registry.
/kling/multi-elementsQueue a Kling multi-elements video editing task.
/repurposeStart a repurposing pipeline from a YouTube or file URL with optional language.Send Idempotency-Key for user-triggered create/retry requests.
#Check status
Poll generation and repurpose records until the job reaches a terminal status.
| Method | Endpoint | Auth | Scope | Audience | Description |
|---|---|---|---|---|---|
| GET | /rico/sessions | API key | rico.media or video | Developers | List recent RICO Supercomputer sessions for the authenticated account. |
| GET | /rico/sessions/:id | API key | rico.media or video | Developers | Fetch a RICO Supercomputer session with messages, workflow steps, status, and current assets. |
| GET | /rico/sessions/:id/events | API key | rico.media or video | Developers | Fetch a polling-friendly RICO session timeline with messages, steps, and assets. |
| POST | /rico/sessions/:id/messages | API key | rico.media or video | Developers | Add a user or assistant message to an existing RICO session. |
| GET | /rico/sessions/:id/assets | API key | rico.media or video | Developers | List media assets produced by a RICO Supercomputer session. |
| GET | /rico/assets | API key | rico.media or video | Developers | List recent RICO media assets. |
| POST | /rico/assets | API key | rico.media or video | Developers | Upload or register a RICO media asset by multipart file, URL, or data URL. |
| GET | /rico/assets/:id | API key | rico.media or video | Developers | Fetch one RICO media asset by id. |
| GET | /generation/:id | API key | video | Developers | Fetch a generation record, status, output video URL, metadata, file size, and any error message. |
| GET | /kling/tasks/:id | API key | video | Developers | Fetch any Kling provider task by local task ID, provider task ID, or external task ID. |
| GET | /repurpose | API key | video | Developers | List recent repurpose jobs. |
| GET | /repurpose/:id | API key | video | Developers | Fetch a repurposing task with rendered clips, transcripts, segments, viral scores, and output URLs. |
| POST | /repurpose/:id/retry | API key | video | Developers | Retry a failed repurpose job. |
| DELETE | /repurpose/:id | API key | video | Developers | Delete a repurpose job by id. |
| PUT | /repurpose/:task_id/clip/:clip_id | API key | video | Developers | Update a clip edit state for a repurpose task. |
| POST | /repurpose/:task_id/clip/:clip_id/render-captions | API key | video | Developers | Render a repurpose clip with timeline edits and optional burned captions. |
/rico/sessionsList recent RICO Supercomputer sessions for the authenticated account.
/rico/sessions/:idFetch a RICO Supercomputer session with messages, workflow steps, status, and current assets.
/rico/sessions/:id/eventsFetch a polling-friendly RICO session timeline with messages, steps, and assets.
/rico/sessions/:id/messagesAdd a user or assistant message to an existing RICO session.
/rico/sessions/:id/assetsList media assets produced by a RICO Supercomputer session.
/rico/assetsList recent RICO media assets.
/rico/assetsUpload or register a RICO media asset by multipart file, URL, or data URL.
/rico/assets/:idFetch one RICO media asset by id.
/generation/:idFetch a generation record, status, output video URL, metadata, file size, and any error message.
/kling/tasks/:idFetch any Kling provider task by local task ID, provider task ID, or external task ID.
/repurposeList recent repurpose jobs.
/repurpose/:idFetch a repurposing task with rendered clips, transcripts, segments, viral scores, and output URLs.
/repurpose/:id/retryRetry a failed repurpose job.
/repurpose/:idDelete a repurpose job by id.
/repurpose/:task_id/clip/:clip_idUpdate a clip edit state for a repurpose task.
/repurpose/:task_id/clip/:clip_id/render-captionsRender a repurpose clip with timeline edits and optional burned captions.
#Image tools
Generate, edit, enhance, faceswap, and create character or 3D-angle assets for video workflows.
| Method | Endpoint | Auth | Scope | Audience | Description |
|---|---|---|---|---|---|
| POST | /images/generate | API key | video | Developers | Generate images from a prompt, reference image, palette, model, and resolution. Kling models are queued through the provider task registry. |
| POST | /kling/images/generations | API key | video | Developers | Queue Kling image generation directly with model_name, n, aspect ratio, references, and provider task status. |
| POST | /kling/general/ai-multi-shot | API key | video | Developers | Queue Kling AI Multi-Shot from one frontal image and store all returned shots in the media library. |
| POST | /kling/images/kolors-virtual-try-on | API key | video | Developers | Queue Kling Kolors virtual try-on with human and cloth images. |
| POST | /images/edit | API key | video | Developers | Edit an image with a prompt and source image URL. |
| POST | /images/enhance | API key | video | Developers | Enhance or upscale an image asset. |
| POST | /images/faceswap | API key | video | Developers | Swap a face between target and source images. |
| POST | /images/3d-angles | API key | video | Developers | Generate a 3D/360-style video from an image. |
| POST | /images/character-gen | API key | video | Developers | Generate a consistent character from a prompt and optional reference image. |
/images/generateGenerate images from a prompt, reference image, palette, model, and resolution. Kling models are queued through the provider task registry.
/kling/images/generationsQueue Kling image generation directly with model_name, n, aspect ratio, references, and provider task status.
/kling/general/ai-multi-shotQueue Kling AI Multi-Shot from one frontal image and store all returned shots in the media library.
/kling/images/kolors-virtual-try-onQueue Kling Kolors virtual try-on with human and cloth images.
/images/editEdit an image with a prompt and source image URL.
/images/enhanceEnhance or upscale an image asset.
/images/faceswapSwap a face between target and source images.
/images/3d-anglesGenerate a 3D/360-style video from an image.
/images/character-genGenerate a consistent character from a prompt and optional reference image.
#Studio tools
Run speech, audio enhancement, lipsync, recast, transition, edit, and ad generation operations.
| Method | Endpoint | Auth | Scope | Audience | Description |
|---|---|---|---|---|---|
| POST | /kling/image-recognize | API key | video | Developers | Run Kling image recognition and segmentation utilities for object, head, face, and clothing masks. |
| POST | /kling/audio/text-to-audio | API key | video | Developers | Queue Kling text-to-audio generation and persist the generated audio in the media library. |
| POST | /kling/audio/video-to-audio | API key | video | Developers | Queue Kling video-to-audio generation for a supplied video source. |
| POST | /kling/lipsync/identify-face | API key | video | Developers | Identify faces for Kling lip-sync workflows before creating the final lip-sync task. |
| POST | /kling/voices | API key | video | Developers | Create a Kling custom voice task. |
| GET | /kling/voices | API key | video | Developers | List Kling custom voices. |
| GET | /kling/voices/:id | API key | video | Developers | Fetch one Kling custom voice task by id. |
| POST | /kling/voices/delete | API key | video | Developers | Queue deletion of a Kling custom voice. |
| GET | /kling/voices/presets | API key | video | Developers | List Kling preset voices available for audio and avatar tools. |
| POST | /kling/elements | API key | video | Developers | Create Kling advanced custom elements for multi-element video editing. |
| GET | /kling/elements | API key | video | Developers | List Kling advanced custom elements. |
| GET | /kling/elements/:id | API key | video | Developers | Fetch one Kling advanced custom element by id. |
| POST | /kling/multi-elements/init-selection | API key | video | Developers | Initialize Kling multi-elements selections for editing workflows. |
| POST | /kling/multi-elements/add-selection | API key | video | Developers | Add a Kling multi-elements selection. |
| POST | /kling/multi-elements/delete-selection | API key | video | Developers | Delete a Kling multi-elements selection. |
| POST | /kling/multi-elements/clear-selection | API key | video | Developers | Clear all Kling multi-elements selections. |
| POST | /kling/multi-elements/preview-selection | API key | video | Developers | Preview a Kling multi-elements selection. |
| GET | /kling/multi-elements | API key | video | Developers | List Kling multi-elements tasks. |
| GET | /kling/multi-elements/:id | API key | video | Developers | Fetch one Kling multi-elements task by id. |
| POST | /repurpose/tts | API key | video | Developers | Generate speech audio from text and a voice selection. |
| POST | /repurpose/enhance-audio | API key | video | Developers | Queue audio enhancement for a source video. |
| POST | /repurpose/lipsync | API key | video | Developers | Synchronize a video with a supplied audio track. |
| POST | /repurpose/recast | API key | video | Developers | Replace or recast a character in a source video with a target image. |
| POST | /video/transitions | API key | video | Developers | Create transitions across two or more input video URLs. |
| POST | /video/edit | API key | video | Developers | Edit an existing video with a natural-language prompt. |
| POST | /ads/generate | API key | video | Developers | Generate an ad creative from a product URL. |
| GET | /broll/search | API key | video | Developers | Search for B-roll media for repurpose and editing workflows. |
/kling/image-recognizeRun Kling image recognition and segmentation utilities for object, head, face, and clothing masks.
/kling/audio/text-to-audioQueue Kling text-to-audio generation and persist the generated audio in the media library.
/kling/audio/video-to-audioQueue Kling video-to-audio generation for a supplied video source.
/kling/lipsync/identify-faceIdentify faces for Kling lip-sync workflows before creating the final lip-sync task.
/kling/voicesCreate a Kling custom voice task.
/kling/voicesList Kling custom voices.
/kling/voices/:idFetch one Kling custom voice task by id.
/kling/voices/deleteQueue deletion of a Kling custom voice.
/kling/voices/presetsList Kling preset voices available for audio and avatar tools.
/kling/elementsCreate Kling advanced custom elements for multi-element video editing.
/kling/elementsList Kling advanced custom elements.
/kling/elements/:idFetch one Kling advanced custom element by id.
/kling/multi-elements/init-selectionInitialize Kling multi-elements selections for editing workflows.
/kling/multi-elements/add-selectionAdd a Kling multi-elements selection.
/kling/multi-elements/delete-selectionDelete a Kling multi-elements selection.
/kling/multi-elements/clear-selectionClear all Kling multi-elements selections.
/kling/multi-elements/preview-selectionPreview a Kling multi-elements selection.
/kling/multi-elementsList Kling multi-elements tasks.
/kling/multi-elements/:idFetch one Kling multi-elements task by id.
/repurpose/ttsGenerate speech audio from text and a voice selection.
/repurpose/enhance-audioQueue audio enhancement for a source video.
/repurpose/lipsyncSynchronize a video with a supplied audio track.
/repurpose/recastReplace or recast a character in a source video with a target image.
/video/transitionsCreate transitions across two or more input video URLs.
/video/editEdit an existing video with a natural-language prompt.
/ads/generateGenerate an ad creative from a product URL.
/broll/searchSearch for B-roll media for repurpose and editing workflows.