Price a generation without generating
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.
Authorization
apiKey In: header
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/generations/quote" \ -H "Content-Type: application/json" \ -d '{}'{ "credits": 0, "model": "string", "kind": "image", "mode": "text", "resolution": "string", "seconds": 0, "aspect_ratio": "21:9", "audio": true, "warnings": [ "string" ]}Upload an image, video or sound to generate from POST
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.
List generations GET
The workspace's images, videos and voices generated with `POST /generations`, newest first, narrowed by `kind`, `status`, `model` and creation time.