Skip to main content

Documentation Index

Fetch the complete documentation index at: https://togetherai-migration.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

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)

Supported image models

See our models page for supported image models.

Safety Checker

We have a built in safety checker that detects NSFW words but you can disable it by passing in "disable_safety_checker": "true". This works for every model except Flux Schnell Free and Flux Pro.
from together import Together

client = Together()

response = client.images.generate(
    prompt="a flying cat",
    model="black-forest-labs/FLUX.1-schnell",
    steps=4,
    disable_safety_checker=True,
)

print(response.data[0].url)