Images
Generate images with a text prompt.
Generating an image
To query an image model, use the .images
method and specify the image model you want to use.
from together import Together
client = Together()
response = client.images.generate(
prompt="a flying cat", model="black-forest-labs/FLUX.1-schnell", steps=4
)
print(response.data[0].url)
import Together from "together-ai";
const together = new Together();
async function main() {
const response = await together.images.create({
prompt: "a flying cat",
model: "black-forest-labs/FLUX.1-schnell",
steps: 4,
});
// @ts-ignore
console.log(response.data[0].url);
}
main();
Supported image models
See our models page for supported image models.
Updated 30 days ago