> ## Documentation Index
> Fetch the complete documentation index at: https://togetherai-migration.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# 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.

<CodeGroup>
  ```py Python theme={null}
  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)
  ```

  ```ts TypeScript theme={null}
  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();
  ```
</CodeGroup>

## Supported image models

See **[our models page](/docs/serverless-models#image-models)** 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.

<CodeGroup>
  ```py Python theme={null}
  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)
  ```

  ```ts TypeScript theme={null}
  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
      disable_safety_checker: true,
    });
    console.log(response.data[0].url);
  }

  main();
  ```
</CodeGroup>
