cURL
curl --request POST \ --url https://api.together.xyz/v1/images/generations \ --header 'Authorization: <api-key>' \ --header 'Content-Type: application/json' \ --data '{ "prompt": "cat floating in space, cinematic", "model": "stabilityai/stable-diffusion-xl-base-1.0", "steps": 20, "seed": 123, "n": 1, "height": 1024, "width": 1024, "negative_prompt": "<string>" }'
{ "id": "<string>", "model": "<string>", "object": "list", "data": [ { "index": 123, "b64_json": "<string>" } ] }
Use an image model to generate an image for a given prompt.
Image generated successfully
The response is of type object.
object