> ## Documentation Index
> Fetch the complete documentation index at: https://docs.vlm.run/llms.txt
> Use this file to discover all available pages before exploring further.

# Generate & Edit

> Generate and edit images from text prompts, sketches, or existing images with creative control

Generate and edit images from text prompts, sketches, or existing images with creative control. Perfect for creative content generation, marketing and advertising, product visualization, and artistic expression.

<Frame caption="Image generation example showing AI-generated images from text prompts with creative control">
  <img src="https://mintcdn.com/autonomiai/n0UzFHKSRrWx1Yji/agents/assets/cat-generate.png?fit=max&auto=format&n=n0UzFHKSRrWx1Yji&q=85&s=140e728aa7bc8d4d658bcb6c70ad2185" alt="Image generation example showing AI-generated images from text prompts with creative control" style={{ width: '60%', border: '1px solid #ddd', borderRadius: '4px' }} width="1024" height="1024" data-path="agents/assets/cat-generate.png" />
</Frame>

<Frame caption="Examples of image generation supported.">
  <div style={{ display: 'flex', gap: '20px', justifyContent: 'center' }}>
    <div style={{ flex: 1 }}>
      <div style={{ textAlign: 'center', marginBottom: '10px' }}>Image-to-Image</div>

      <img src="https://mintcdn.com/autonomiai/n0UzFHKSRrWx1Yji/agents/assets/imagegen-image-to-image.jpg?fit=max&auto=format&n=n0UzFHKSRrWx1Yji&q=85&s=8aff91eceb97ef6931d96546e1e063bf" alt="Text-to-Image" style={{ width: '100%', border: '1px solid #ddd', borderRadius: '4px' }} width="1184" height="864" data-path="agents/assets/imagegen-image-to-image.jpg" />
    </div>

    <div style={{ flex: 1 }}>
      <div style={{ textAlign: 'center', marginBottom: '10px' }}>Image-Inpainting</div>

      <img src="https://mintcdn.com/autonomiai/n0UzFHKSRrWx1Yji/agents/assets/imagegen-dog-car.jpg?fit=max&auto=format&n=n0UzFHKSRrWx1Yji&q=85&s=c1a9fff2903a39be46c1f9b98e8b87a7" alt="Image-Inpainting" style={{ width: '100%', border: '1px solid #ddd', borderRadius: '4px' }} width="1184" height="864" data-path="agents/assets/imagegen-dog-car.jpg" />
    </div>

    <div style={{ flex: 1 }}>
      <div style={{ textAlign: 'center', marginBottom: '10px' }}>Style Transfer</div>

      <img src="https://mintcdn.com/autonomiai/n0UzFHKSRrWx1Yji/agents/assets/imagegen-style-transfer.jpg?fit=max&auto=format&n=n0UzFHKSRrWx1Yji&q=85&s=4aa6fff5d8a852db283843cd4231f85d" alt="Style Transfer" style={{ width: '100%', border: '1px solid #ddd', borderRadius: '4px' }} width="1248" height="832" data-path="agents/assets/imagegen-style-transfer.jpg" />
    </div>
  </div>
</Frame>

## Example Usage

<Tip>
  For best results, we recommend using the [Structured Outputs API](/agents/structured-responses) to get responses in a structured and validated data format.
</Tip>

### Text-to-Image

Generate images from text descriptions with creative control over style, composition, and details.

Generate an image of a cat flying through the sky and clouds, with the background of a green city with river

<CodeGroup>
  ```python Python theme={"theme":{"light":"github-light","dark":"dark-plus"}}
  from vlmrun.client import VLMRun

  # Initialize the VLMRun client
  client = VLMRun(api_key="<VLMRUN_API_KEY>")

  # Generate the image
  response = client.agent.completions.create(
      model="vlmrun-orion-1:auto",
      messages=[
          {
              "role": "user",
              "content": "Generate an image of a modern building as a cyberpunk-style futuristic structure with neon lights and holographic elements"
          }
      ]
  )

  print(response.choices[0].message.content)
  # >>> {"url": "https://.../image.jpg"}
  ```

  ```python Python - Structured Outputs theme={"theme":{"light":"github-light","dark":"dark-plus"}}
  from vlmrun.client import VLMRun
  from pydantic import BaseModel, Field

  # Define the response schema
  class ImageGenerationResponse(BaseModel):
    url: str = Field(..., description="The URL of the generated image")

  # Initialize the VLMRun client
  client = VLMRun(api_key="<VLMRUN_API_KEY>")

  # Generate the image with structured output
  response = client.agent.completions.create(
      model="vlmrun-orion-1:auto",
      messages=[
          {
              "role": "user",
              "content": "Generate an image of a modern building as a cyberpunk-style futuristic structure with neon lights and holographic elements"
          }
      ],
      response_format={"type": "json_schema", "schema": ImageGenerationResponse.model_json_schema()}
  )

  # Validate the response
  result = ImageGenerationResponse.model_validate_json(response.choices[0].message.content)
  # >>> ImageGenerationResponse(url="https://.../image.jpg")
  ```

  ```typescript Node.js theme={"theme":{"light":"github-light","dark":"dark-plus"}}
  import { VlmRun } from "vlmrun";

  const client = new VlmRun({
    apiKey: "<VLMRUN_API_KEY>",
    baseURL: "https://api.vlm.run/v1"
  });

  const response = await client.agent.completions.create({
    model: "vlmrun-orion-1:auto",
    messages: [
      {
        role: "user",
        content: "Generate an image of a modern building as a cyberpunk-style futuristic structure with neon lights and holographic elements"
      }
    ]
  });

  console.log(response.choices[0].message.content);
  ```

  ```typescript Node.js - Structured Outputs [expandable] theme={"theme":{"light":"github-light","dark":"dark-plus"}}
  import { VlmRun } from "vlmrun";
  import { z } from "zod";
  import { zodToJsonSchema } from "zod-to-json-schema";

  // Define the response schema with Zod
  const ImageGenerationResponseSchema = z.object({
    url: z.string().describe("The URL of the generated image")
  });

  // Initialize the VLMRun client
  const client = new VlmRun({
    apiKey: "<VLMRUN_API_KEY>",
    baseURL: "https://api.vlm.run/v1"
  });

  // Generate the image with structured output
  const response = await client.agent.completions.create({
    model: "vlmrun-orion-1:auto",
    messages: [
      {
        role: "user",
        content: "Generate an image of a modern building as a cyberpunk-style futuristic structure with neon lights and holographic elements"
      }
    ],
    response_format: {
      type: "json_schema",
      schema: zodToJsonSchema(ImageGenerationResponseSchema)
    }
  });

  const result = ImageGenerationResponseSchema.parse(JSON.parse(response.choices[0].message.content));
  ```
</CodeGroup>

### Image-to-Image

Transform existing images by applying new styles, enhancing details, or changing specific elements while preserving the original structure.

<Frame caption="Example of image inpainting.">
  <div style={{ display: 'flex', gap: '20px', justifyContent: 'center' }}>
    <img width="70%" src="https://mintcdn.com/autonomiai/n0UzFHKSRrWx1Yji/agents/assets/imagegen-image-to-image.jpg?fit=max&auto=format&n=n0UzFHKSRrWx1Yji&q=85&s=8aff91eceb97ef6931d96546e1e063bf" alt="Image-to-Image example showing AI-generated images combining objects from two separate images" style={{ width: '80%', border: '1px solid #ddd', borderRadius: '4px' }} data-path="agents/assets/imagegen-image-to-image.jpg" />
  </div>
</Frame>

<Frame caption="Examples of image inputs for inpainting.">
  <div style={{ display: 'flex', gap: '20px', justifyContent: 'center' }}>
    <div style={{ flex: 1 }}>
      <div style={{ textAlign: 'center', marginBottom: '10px' }}>Reference Dog Image</div>

      <img src="https://storage.googleapis.com/vlm-data-public-prod/hub/examples/image.object-detection/dog-cat.jpg" alt="Reference Dog Image" style={{ width: '95%', border: '1px solid #ddd', borderRadius: '4px' }} />
    </div>

    <div style={{ flex: 1 }}>
      <div style={{ textAlign: 'center', marginBottom: '10px' }}>Dog flying through space</div>

      <img src="https://mintcdn.com/autonomiai/n0UzFHKSRrWx1Yji/agents/assets/imagegen-image-to-image.jpg?fit=max&auto=format&n=n0UzFHKSRrWx1Yji&q=85&s=8aff91eceb97ef6931d96546e1e063bf" alt="More examples of image-to-image" style={{ width: '100%', border: '1px solid #ddd', borderRadius: '4px' }} width="1184" height="864" data-path="agents/assets/imagegen-image-to-image.jpg" />
    </div>
  </div>
</Frame>

<CodeGroup>
  ```python Python theme={"theme":{"light":"github-light","dark":"dark-plus"}}
  from vlmrun.client import VLMRun

  # Initialize the VLMRun client
  client = VLMRun(api_key="<VLMRUN_API_KEY>")

  # Generate the image
  response = client.agent.completions.create(
      model="vlmrun-orion-1:auto",
      messages=[
          {
              "role": "user",
              "content": [
                  {"type": "text", "text": "Transform the image of my dog on the right into a flying dog with superman cape, with majestic background"},
                  {"type": "image_url", "image_url": {"url": "https://storage.googleapis.com/vlm-data-public-prod/hub/examples/image.object-detection/dog-cat.jpg", "detail": "auto"}}
              ]
          }
      ]
  )

  print(response.choices[0].message.content)
  # >>> {"url": "https://.../image.jpg"}
  ```

  ```python Python - Structured Outputs theme={"theme":{"light":"github-light","dark":"dark-plus"}}
  from vlmrun.client import VLMRun
  from pydantic import BaseModel, Field

  # Define the response schema
  class ImageGenerationResponse(BaseModel):
    url: str = Field(..., description="The URL of the generated image")

  # Initialize the VLMRun client
  client = VLMRun(api_key="<VLMRUN_API_KEY>")

  # Transform the image with structured output
  response = client.agent.completions.create(
      model="vlmrun-orion-1:auto",
      messages=[
          {
              "role": "user",
              "content": [
                  {"type": "text", "text": "Transform the image of my dog on the right into a flying dog with superman cape, with majestic background"},
                  {"type": "image_url", "image_url": {"url": "https://storage.googleapis.com/vlm-data-public-prod/hub/examples/image.object-detection/dog-cat.jpg", "detail": "auto"}}
              ]
          }
      ],
      response_format={"type": "json_schema", "schema": ImageGenerationResponse.model_json_schema()}
  )

  # Validate the response
  result = ImageGenerationResponse.model_validate_json(response.choices[0].message.content)
  ```

  ```typescript Node.js theme={"theme":{"light":"github-light","dark":"dark-plus"}}
  import { VlmRun } from "vlmrun";

  const client = new VlmRun({
    apiKey: "<VLMRUN_API_KEY>",
    baseURL: "https://api.vlm.run/v1"
  });

  const response = await client.agent.completions.create({
    model: "vlmrun-orion-1:auto",
    messages: [
      {
        role: "user",
        content: [
          { type: "text", text: "Transform the image of my dog on the right into a flying dog with superman cape, with majestic background" },
          { type: "image_url", image_url: { url: "https://storage.googleapis.com/vlm-data-public-prod/hub/examples/image.object-detection/dog-cat.jpg", detail: "auto" } }
        ]
      }
    ]
  });

  console.log(response.choices[0].message.content);
  ```

  ```typescript Node.js - Structured Outputs [expandable] theme={"theme":{"light":"github-light","dark":"dark-plus"}}
  import { VlmRun } from "vlmrun";
  import { z } from "zod";
  import { zodToJsonSchema } from "zod-to-json-schema";

  // Define the response schema with Zod
  const ImageGenerationResponseSchema = z.object({
    url: z.string().describe("The URL of the generated image")
  });

  // Initialize the VLMRun client
  const client = new VlmRun({
    apiKey: "<VLMRUN_API_KEY>",
    baseURL: "https://api.vlm.run/v1"
  });

  // Transform the image with structured output
  const response = await client.agent.completions.create({
    model: "vlmrun-orion-1:auto",
    messages: [
      {
        role: "user",
        content: [
          { type: "text", text: "Transform the image of my dog on the right into a flying dog with superman cape, with majestic background" },
          { type: "image_url", image_url: { url: "https://storage.googleapis.com/vlm-data-public-prod/hub/examples/image.object-detection/dog-cat.jpg", detail: "auto" } }
        ]
      }
    ],
    response_format: {
      type: "json_schema",
      schema: zodToJsonSchema(ImageGenerationResponseSchema)
    }
  });

  const result = ImageGenerationResponseSchema.parse(JSON.parse(response.choices[0].message.content));
  ```
</CodeGroup>

### Image Inpainting

Fill in missing areas, remove unwanted objects, or add new elements to existing images seamlessly.

<Frame caption="Example of image inpainting.">
  <div style={{ display: 'flex', gap: '20px', justifyContent: 'center' }}>
    <img width="70%" src="https://mintcdn.com/autonomiai/n0UzFHKSRrWx1Yji/agents/assets/imagegen-dog-car.jpg?fit=max&auto=format&n=n0UzFHKSRrWx1Yji&q=85&s=c1a9fff2903a39be46c1f9b98e8b87a7" alt="Image inpainting example showing AI-generated images combining objects from two separate images" style={{ width: '80%', border: '1px solid #ddd', borderRadius: '4px' }} data-path="agents/assets/imagegen-dog-car.jpg" />
  </div>
</Frame>

<Frame caption="Examples of image inputs for inpainting.">
  <div style={{ display: 'flex', gap: '20px', justifyContent: 'center' }}>
    <div style={{ flex: 1 }}>
      <div style={{ textAlign: 'center', marginBottom: '10px' }}>Reference Dog Image</div>

      <img src="https://storage.googleapis.com/vlm-data-public-prod/hub/examples/image.object-detection/dogs.jpg" alt="Reference Dog Image" style={{ width: '95%', border: '1px solid #ddd', borderRadius: '4px' }} />
    </div>

    <div style={{ flex: 1 }}>
      <div style={{ textAlign: 'center', marginBottom: '10px' }}>Reference Car Image</div>

      <img src="https://storage.googleapis.com/vlm-data-public-prod/hub/examples/image.caption/car.jpg" alt="Reference Car Image" style={{ width: '70%', border: '1px solid #ddd', borderRadius: '4px' }} />
    </div>
  </div>
</Frame>

<CodeGroup>
  ```python Python theme={"theme":{"light":"github-light","dark":"dark-plus"}}
  from vlmrun.client import VLMRun

  # Initialize the VLMRun client
  client = VLMRun(api_key="<VLMRUN_API_KEY>")

  # Generate the image
  response = client.agent.completions.create(
      model="vlmrun-orion-1:auto",
      messages=[
          {
              "role": "user",
              "content": [
                  {"type": "text", "text": "Given two images: the first with a dog in front holding a yellow ball, inpaint her driving the car shown in the second image."},
                  {"type": "image_url", "image_url": {"url": "https://storage.googleapis.com/vlm-data-public-prod/hub/examples/image.object-detection/dogs.jpg", "detail": "auto"}},
                  {"type": "image_url", "image_url": {"url": "https://storage.googleapis.com/vlm-data-public-prod/hub/examples/image.caption/car.jpg", "detail": "auto"}}
              ]
          }
      ]
  )

  print(response.choices[0].message.content)
  # >>> {"url": "https://.../image.jpg"}
  ```

  ```python Python - Structured Outputs theme={"theme":{"light":"github-light","dark":"dark-plus"}}
  from vlmrun.client import VLMRun
  from pydantic import BaseModel, Field

  # Define the response schema
  class ImageGenerationResponse(BaseModel):
    url: str = Field(..., description="The URL of the generated image")

  # Initialize the VLMRun client
  client = VLMRun(api_key="<VLMRUN_API_KEY>")

  # Inpaint the image with structured output
  response = client.agent.completions.create(
      model="vlmrun-orion-1:auto",
      messages=[
          {
              "role": "user",
              "content": [
                  {"type": "text", "text": "Given two images: the first with a dog in front holding a yellow ball, inpaint her driving the car shown in the second image."},
                  {"type": "image_url", "image_url": {"url": "https://storage.googleapis.com/vlm-data-public-prod/hub/examples/image.object-detection/dogs.jpg", "detail": "auto"}},
                  {"type": "image_url", "image_url": {"url": "https://storage.googleapis.com/vlm-data-public-prod/hub/examples/image.caption/car.jpg", "detail": "auto"}}
              ]
          }
      ],
      response_format={"type": "json_schema", "schema": ImageGenerationResponse.model_json_schema()}
  )

  # Validate the response
  result = ImageGenerationResponse.model_validate_json(response.choices[0].message.content)
  ```

  ```typescript Node.js theme={"theme":{"light":"github-light","dark":"dark-plus"}}
  import { VlmRun } from "vlmrun";

  const client = new VlmRun({
    apiKey: "<VLMRUN_API_KEY>",
    baseURL: "https://api.vlm.run/v1"
  });

  const response = await client.agent.completions.create({
    model: "vlmrun-orion-1:auto",
    messages: [
      {
        role: "user",
        content: [
          { type: "text", text: "Given two images: the first with a dog in front holding a yellow ball, inpaint her driving the car shown in the second image." },
          { type: "image_url", image_url: { url: "https://storage.googleapis.com/vlm-data-public-prod/hub/examples/image.object-detection/dogs.jpg", detail: "auto" } },
          { type: "image_url", image_url: { url: "https://storage.googleapis.com/vlm-data-public-prod/hub/examples/image.caption/car.jpg", detail: "auto" } }
        ]
      }
    ]
  });

  console.log(response.choices[0].message.content);
  ```

  ```typescript Node.js - Structured Outputs [expandable] theme={"theme":{"light":"github-light","dark":"dark-plus"}}
  import { VlmRun } from "vlmrun";
  import { z } from "zod";
  import { zodToJsonSchema } from "zod-to-json-schema";

  // Define the response schema with Zod
  const ImageGenerationResponseSchema = z.object({
    url: z.string().describe("The URL of the generated image")
  });

  // Initialize the VLMRun client
  const client = new VlmRun({
    apiKey: "<VLMRUN_API_KEY>",
    baseURL: "https://api.vlm.run/v1"
  });

  // Inpaint the image with structured output
  const response = await client.agent.completions.create({
    model: "vlmrun-orion-1:auto",
    messages: [
      {
        role: "user",
        content: [
          { type: "text", text: "Given two images: the first with a dog in front holding a yellow ball, inpaint her driving the car shown in the second image." },
          { type: "image_url", image_url: { url: "https://storage.googleapis.com/vlm-data-public-prod/hub/examples/image.object-detection/dogs.jpg", detail: "auto" } },
          { type: "image_url", image_url: { url: "https://storage.googleapis.com/vlm-data-public-prod/hub/examples/image.caption/car.jpg", detail: "auto" } }
        ]
      }
    ],
    response_format: {
      type: "json_schema",
      schema: zodToJsonSchema(ImageGenerationResponseSchema)
    }
  });

  const result = ImageGenerationResponseSchema.parse(JSON.parse(response.choices[0].message.content));
  ```
</CodeGroup>

### Style Transfer

Apply artistic styles from reference images to transform the visual appearance while preserving content. In the example below, we apply the Van Gogh's "Starry Night" painting style to a photo of a city skyline at night.

<Frame caption="Example of image style transfer.">
  <div style={{ display: 'flex', gap: '20px', justifyContent: 'center' }}>
    <img width="70%" src="https://mintcdn.com/autonomiai/n0UzFHKSRrWx1Yji/agents/assets/imagegen-style-transfer.jpg?fit=max&auto=format&n=n0UzFHKSRrWx1Yji&q=85&s=4aa6fff5d8a852db283843cd4231f85d" alt="Example of image style transfer" style={{ width: '80%', border: '1px solid #ddd', borderRadius: '4px' }} data-path="agents/assets/imagegen-style-transfer.jpg" />
  </div>
</Frame>

<Frame caption="Examples of image inputs for style transfer.">
  <div style={{ display: 'flex', gap: '20px', justifyContent: 'center' }}>
    <div style={{ flex: 1 }}>
      <div style={{ textAlign: 'center', marginBottom: '10px' }}>Reference Van Gogh Image</div>

      <img src="https://storage.googleapis.com/vlm-data-public-prod/hub/examples/image.generation/starry-night.jpg" alt="Reference Van Gogh Image" style={{ width: '80%', border: '1px solid #ddd', borderRadius: '4px' }} />
    </div>

    <div style={{ flex: 1 }}>
      <div style={{ textAlign: 'center', marginBottom: '10px' }}>Reference City Image</div>

      <img src="https://storage.googleapis.com/vlm-data-public-prod/hub/examples/image.generation/sf-golden-gate.jpg" alt="Reference City Image" style={{ width: '95%', border: '1px solid #ddd', borderRadius: '4px' }} />
    </div>
  </div>
</Frame>

<CodeGroup>
  ```python Python theme={"theme":{"light":"github-light","dark":"dark-plus"}}
  from vlmrun.client import VLMRun

  # Initialize the VLMRun client
  client = VLMRun(api_key="<VLMRUN_API_KEY>")

  # Generate the image
  response = client.agent.completions.create(
      model="vlmrun-orion-1:auto",
      messages=[
          {
              "role": "user",
              "content": [
                  {"type": "text", "text": "Given two images: the first with a Van Gogh painting, and the second with a city skyline at night, apply the Van Gogh painting style to the city skyline."},
                  {"type": "image_url", "image_url": {"url": "https://storage.googleapis.com/vlm-data-public-prod/hub/examples/image.generation/starry-night.jpg", "detail": "auto"}},
                  {"type": "image_url", "image_url": {"url": "https://storage.googleapis.com/vlm-data-public-prod/hub/examples/image.generation/sf-golden-gate.jpg", "detail": "auto"}}
              ]
          }
      ]
  )

  print(response.choices[0].message.content)
  # >>> {"url": "https://.../image.jpg"}
  ```

  ```python Python - Structured Outputs theme={"theme":{"light":"github-light","dark":"dark-plus"}}
  from vlmrun.client import VLMRun
  from pydantic import BaseModel, Field

  # Define the response schema
  class ImageGenerationResponse(BaseModel):
    url: str = Field(..., description="The URL of the generated image")

  # Initialize the VLMRun client
  client = VLMRun(api_key="<VLMRUN_API_KEY>")

  # Apply style transfer with structured output
  response = client.agent.completions.create(
      model="vlmrun-orion-1:auto",
      messages=[
          {
              "role": "user",
              "content": [
                  {"type": "text", "text": "Given two images: the first with a Van Gogh painting, and the second with a city skyline at night, apply the Van Gogh painting style to the city skyline."},
                  {"type": "image_url", "image_url": {"url": "https://storage.googleapis.com/vlm-data-public-prod/hub/examples/image.generation/starry-night.jpg", "detail": "auto"}},
                  {"type": "image_url", "image_url": {"url": "https://storage.googleapis.com/vlm-data-public-prod/hub/examples/image.generation/sf-golden-gate.jpg", "detail": "auto"}}
              ]
          }
      ],
      response_format={"type": "json_schema", "schema": ImageGenerationResponse.model_json_schema()}
  )

  # Validate the response
  result = ImageGenerationResponse.model_validate_json(response.choices[0].message.content)
  ```

  ```typescript Node.js theme={"theme":{"light":"github-light","dark":"dark-plus"}}
  import { VlmRun } from "vlmrun";

  const client = new VlmRun({
    apiKey: "<VLMRUN_API_KEY>",
    baseURL: "https://api.vlm.run/v1"
  });

  const response = await client.agent.completions.create({
    model: "vlmrun-orion-1:auto",
    messages: [
      {
        role: "user",
        content: [
          { type: "text", text: "Given two images: the first with a Van Gogh painting, and the second with a city skyline at night, apply the Van Gogh painting style to the city skyline." },
          { type: "image_url", image_url: { url: "https://storage.googleapis.com/vlm-data-public-prod/hub/examples/image.generation/starry-night.jpg", detail: "auto" } },
          { type: "image_url", image_url: { url: "https://storage.googleapis.com/vlm-data-public-prod/hub/examples/image.generation/sf-golden-gate.jpg", detail: "auto" } }
        ]
      }
    ]
  });

  console.log(response.choices[0].message.content);
  ```

  ```typescript Node.js - Structured Outputs [expandable] theme={"theme":{"light":"github-light","dark":"dark-plus"}}
  import { VlmRun } from "vlmrun";
  import { z } from "zod";
  import { zodToJsonSchema } from "zod-to-json-schema";

  // Define the response schema with Zod
  const ImageGenerationResponseSchema = z.object({
    url: z.string().describe("The URL of the generated image")
  });

  // Initialize the VLMRun client
  const client = new VlmRun({
    apiKey: "<VLMRUN_API_KEY>",
    baseURL: "https://api.vlm.run/v1"
  });

  // Apply style transfer with structured output
  const response = await client.agent.completions.create({
    model: "vlmrun-orion-1:auto",
    messages: [
      {
        role: "user",
        content: [
          { type: "text", text: "Given two images: the first with a Van Gogh painting, and the second with a city skyline at night, apply the Van Gogh painting style to the city skyline." },
          { type: "image_url", image_url: { url: "https://storage.googleapis.com/vlm-data-public-prod/hub/examples/image.generation/starry-night.jpg", detail: "auto" } },
          { type: "image_url", image_url: { url: "https://storage.googleapis.com/vlm-data-public-prod/hub/examples/image.generation/sf-golden-gate.jpg", detail: "auto" } }
        ]
      }
    ],
    response_format: {
      type: "json_schema",
      schema: zodToJsonSchema(ImageGenerationResponseSchema)
    }
  });

  const result = ImageGenerationResponseSchema.parse(JSON.parse(response.choices[0].message.content));
  ```
</CodeGroup>

## FAQ

<AccordionGroup>
  <Accordion title="Suggest the supported styles for image generation?" icon="palette">
    * **Photorealistic**: Ultra-realistic images with fine details
    * **High Detail**: Ultra-realistic images with fine details
    * **Natural Lighting**: Realistic lighting and shadows
    * **Professional Quality**: Suitable for commercial and professional use
    * **Multiple Subjects**: People, objects, landscapes, architecture
  </Accordion>

  <Accordion title="What are some tips for creating effective prompts?" icon="lightbulb">
    * **Be Specific**: Include details about style, composition, lighting, and mood
    * **Use Keywords**: Include relevant art terms, techniques, and descriptors
    * **Reference Styles**: Mention specific artists, art movements, or visual styles
    * **Technical Details**: Specify resolution, quality, and output format needs
  </Accordion>
</AccordionGroup>
