Animate image
Use IMAGE_TO_VIDEO to animate an owned image. Discover a compatible model, quote its exact configuration, then submit and track the saved operation.
Prepare the image#
Uploads and assetsUpload one file per request. The purpose selects the native format checks and size limit. Director uploads also require a project ID.Discover modelsDiscover enabled models, prices and reference capabilities for the selected workflow.
Replace example model IDs, reference fields and capability revisions with values from current discovery. Reference support varies by model and workflow.
Quote the animation#
curl -X POST 'https://platform.tongai.io/v1/tools/tong_generation_quote/operations' \ -H "Authorization: Bearer $TONG_API_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: 45be69f1-c266-4a09-a82c-bf3c6303eb03" \ -d '{ "input": { "body": { "operation": "IMAGE_TO_VIDEO", "model": "MODEL_ID_FROM_DISCOVERY", "resolution": "720p", "durationSeconds": 5, "inputAssetIds": [ "aaaaaaaaaaaaaaaaaaaaaaaa" ], "routingParameters": { "ratio": "16:9" } } }}'Configuration
curl --versionSubmit the animation#
curl -X POST 'https://platform.tongai.io/v1/tools/tong_generation_submit/operations' \ -H "Authorization: Bearer $TONG_API_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: 45be69f1-c266-4a09-a82c-bf3c6303eb03" \ -d '{ "input": { "params": { "id": "cccccccccccccccccccccccc" }, "body": { "operation": "IMAGE_TO_VIDEO", "quoteId": "QUOTE_SUBMIT_VALUE", "prompt": "Animate the supplied image with a slow camera push.", "inputAssetIds": [ "aaaaaaaaaaaaaaaaaaaaaaaa" ], "parameters": { "videoModel": "MODEL_ID_FROM_DISCOVERY", "resolution": "720p", "durationSeconds": 5, "ratio": "16:9" } } }}'Configuration
curl --versionFollow the result#
An accepted request is not a finished generation. Track the saved job until its output is ready.
curl 'https://platform.tongai.io/v1/operations/e8aa0a87-6cd9-42eb-975a-b72bf43218c8' \ -H "Authorization: Bearer $TONG_API_KEY"Configuration
curl --versionRequests and logsAn accepted request is not a finished generation. Track the saved job until its output is ready.PricingCompare customer credit rates and configuration-dependent prices.Submit a generationSubmit the configured action using your Tong account and credits. Follow the saved operation until it finishes.