Upload an image, video or sound to generate from
Takes one file as multipart/form-data (file), or a public link to an image or a sound as JSON (url), reads whether it is an image, a video or a sound and keeps it in the workspace library, where it counts toward storage. A file goes up to 100 MB; a video is taken as a file only, never by link. Pass the id in image_ids, audio_ids or video_id of POST /generations. An image or sound link can also go straight into image_urls or audio_urls there.
Authorization
apiKey In: header
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/generations/media" \ -H "Content-Type: application/json" \ -d '{}'{ "id": "string", "kind": "image", "seconds": 0}Upload a reference image POST
Sends one image as `multipart/form-data`, to animate it, use it as a first or last frame, or borrow a person, product or style from it. It goes to the workspace library and counts toward its storage. Pass the returned `id` in `image_ids` of `POST /generations`. An image CutPro generated needs no upload: its `output.image_id` works the same.
Price a generation without generating POST
Takes the same request as `POST /generations`, checks it against the model and answers with the exact total in credits and the model, mode and resolution it resolved to (from `preset` and the inputs sent, when left out). Free, charges nothing and keeps no file. Show the total to the user, then send it as `credits` in `POST /generations`. A field the model does not take answers `400` with what it takes in `extra.allowed`.