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

# Qwen Image 2.1 Turbo

> Qwen Image 2.1 Turbo keeps the 2.1 architecture and contract but cuts denoising from 40 steps to 8, making it the best price-performance option in the...



## OpenAPI

````yaml api-reference/openapi/qwen-image--qwen-image-2.1-turbo.yaml POST /v1/images/generations
openapi: 3.1.0
info:
  title: Qwen Image 2.1 Turbo API
  version: 1.0.0
  description: >-
    Qwen Image 2.1 Turbo keeps the 2.1 architecture and contract but cuts
    denoising from 40 steps to 8, making it the best price-performance option in
    the Qwen-Image series. It generates and edits images with up to 10 reference
    images, supports native transparent output, and retains native 2K resolution
    at 1-6 images per request. In APIPod, the public model ID is
    qwen-image-2.1-turbo. It supports text-to-image and image generation and
    editing, accepts text and image inputs, and returns results through
    asynchronous image tasks.
servers:
  - url: https://api.apipod.ai
    description: Production
security: []
paths:
  /v1/images/generations:
    post:
      tags:
        - Qwen Image 2.1 Turbo
      summary: Create Generation Task
      description: >-
        Qwen Image 2.1 Turbo keeps the 2.1 architecture and contract but cuts
        denoising from 40 steps to 8, making it the best price-performance
        option in the Qwen-Image series. It generates and edits images with up
        to 10 reference images, supports native transparent output, and retains
        native 2K resolution at 1-6 images per request. In APIPod, the public
        model ID is qwen-image-2.1-turbo. It supports text-to-image and image
        generation and editing, accepts text and image inputs, and returns
        results through asynchronous image tasks.
      operationId: create-qwen-image-qwen-image-2.1-turbo
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              title: Qwen Image 2.1 Turbo
              properties:
                aspect_ratio:
                  type: string
                  title: Aspect Ratio
                  description: >-
                    Output aspect ratio, used together with resolution. Any
                    ratio from 1:8 to 8:1 is accepted.
                  enum:
                    - auto
                    - '1:1'
                    - '1:2'
                    - '2:1'
                    - '1:3'
                    - '3:1'
                    - '1:4'
                    - '4:1'
                    - '1:8'
                    - '8:1'
                    - '2:3'
                    - '3:2'
                    - '3:4'
                    - '4:3'
                    - '4:5'
                    - '5:4'
                    - '9:16'
                    - '16:9'
                    - '9:21'
                    - '21:9'
                enable_thinking:
                  type: boolean
                  title: Enable Thinking
                  description: >-
                    Enable reasoning before rendering to improve output quality
                    at the cost of latency. Takes effect only when prompt_extend
                    is enabled; the upstream default is on.
                image_urls:
                  type: array
                  title: Reference Images
                  description: >-
                    Optional. Omit for text-to-image; pass 1 to 10 images to
                    switch the same model into instruction-based editing.
                  items:
                    type: string
                    title: Image URL
                model:
                  type: string
                  title: Model ID
                  description: Public APIPod model ID.
                  const: qwen-image-2.1-turbo
                'n':
                  type: integer
                  title: Number of images
                  description: >-
                    Number of images to generate per request. Each returned
                    image is billed separately.
                  enum:
                    - 1
                    - 2
                    - 3
                    - 4
                    - 5
                    - 6
                  default: 1
                  minimum: 1
                  maximum: 6
                prompt:
                  type: string
                  title: Prompt
                  description: >-
                    What to generate, or how to edit the reference images when
                    image_urls is present. Prompts up to about 4.5k tokens are
                    accepted.
                  maxLength: 32000
                prompt_extend:
                  type: boolean
                  title: Prompt Extend
                  description: >-
                    Expand short prompts before rendering (adds 3 to 5 seconds).
                    Disable for precise, already-detailed prompts.
                  default: true
                prompt_extend_mode:
                  type: string
                  title: Prompt Extend Mode
                  description: >-
                    Prompt rewriting strategy when prompt_extend is enabled.
                    direct (the default) supports both text-to-image and
                    editing; agent rewrites in more detail and is supported for
                    text-to-image only.
                  enum:
                    - direct
                    - agent
                resolution:
                  type: string
                  title: Resolution
                  description: >-
                    Recommended output tier. Combined with aspect_ratio the API
                    derives the exact pixel size.
                  enum:
                    - 1K
                    - 2K
                  default: 2K
                seed:
                  type: integer
                  title: Seed
                  description: >-
                    Random seed from 0 to 2147483647. Reuse a seed for more
                    stable results.
                  minimum: 0
                  maximum: 2147483647
                size:
                  type: string
                  title: Size
                  description: >-
                    Exact pixel override, WIDTHxHEIGHT. Total pixels must stay
                    between 512*512 and 2048*2048 at 1:8 to 8:1. Takes
                    precedence over resolution and aspect_ratio; omit to let the
                    model choose.
                watermark:
                  type: boolean
                  title: Watermark
                  description: Add an AI-generated watermark in the bottom right corner.
                  default: false
              required:
                - model
                - prompt
            example:
              aspect_ratio: '16:9'
              model: qwen-image-2.1-turbo
              'n': 1
              prompt: >-
                A premium product photograph on a dark studio set, precise
                typography, soft rim lighting, highly detailed.
              resolution: 2K
      responses:
        '200':
          description: Task accepted
          content:
            application/json:
              schema:
                type: object
                title: Task Submit Response
                description: Standard response for task submission
                properties:
                  code:
                    type: integer
                  data:
                    type: object
                    title: Task Submit Data
                    description: Data content for task submission
                    properties:
                      task_id:
                        type: string
                        description: generation task id
                  message:
                    type: string
                required:
                  - code
                  - message
                  - data
              example:
                code: 200
                message: success
                data:
                  task_id: img_task_01JEXAMPLE
      security:
        - bearerAuth: []
      x-codeSamples:
        - lang: Shell
          label: cURL
          source: |-
            curl https://api.apipod.ai/v1/images/generations \
              -H "Authorization: Bearer $APIPOD_API_KEY" \
              -H "Content-Type: application/json" \
              -d '{
              "aspect_ratio": "16:9",
              "model": "qwen-image-2.1-turbo",
              "n": 1,
              "prompt": "A premium product photograph on a dark studio set, precise typography, soft rim lighting, highly detailed.",
              "resolution": "2K"
              
            }'
        - lang: Python
          label: Python
          source: |-
            import os
            import requests

            payload = {
              "aspect_ratio": "16:9",
              "model": "qwen-image-2.1-turbo",
              "n": 1,
              "prompt": "A premium product photograph on a dark studio set, precise typography, soft rim lighting, highly detailed.",
              "resolution": "2K"
              
            }

            response = requests.post(
                "https://api.apipod.ai/v1/images/generations",
                headers={
                    "Authorization": f"Bearer {os.environ['APIPOD_API_KEY']}",
                    "Content-Type": "application/json",
                },
                json=payload,
                timeout=60,
            )
            response.raise_for_status()
            print(response.json())
        - lang: Go
          label: Go
          source: |-
            package main

            import (
                "bytes"
                "encoding/json"
                "fmt"
                "net/http"
                "os"
            )

            func main() {
                payload := map[string]any{}
                if err := json.Unmarshal([]byte(`{
              "aspect_ratio": "16:9",
              "model": "qwen-image-2.1-turbo",
              "n": 1,
              "prompt": "A premium product photograph on a dark studio set, precise typography, soft rim lighting, highly detailed.",
              "resolution": "2K"
              
            }`), &payload); err != nil {
                    panic(err)
                }
                body, err := json.Marshal(payload)
                if err != nil {
                    panic(err)
                }

                req, err := http.NewRequest(http.MethodPost, "https://api.apipod.ai/v1/images/generations", bytes.NewReader(body))
                if err != nil {
                    panic(err)
                }
                req.Header.Set("Authorization", "Bearer "+os.Getenv("APIPOD_API_KEY"))
                req.Header.Set("Content-Type", "application/json")

                resp, err := http.DefaultClient.Do(req)
                if err != nil {
                    panic(err)
                }
                defer resp.Body.Close()
                fmt.Println(resp.Status)
            }
        - lang: Rust
          label: Rust
          source: |-
            use reqwest::Client;
            use serde_json::json;
            use std::env;

            #[tokio::main]
            async fn main() -> Result<(), Box<dyn std::error::Error>> {
                let payload = json!({
              "aspect_ratio": "16:9",
              "model": "qwen-image-2.1-turbo",
              "n": 1,
              "prompt": "A premium product photograph on a dark studio set, precise typography, soft rim lighting, highly detailed.",
              "resolution": "2K"
              
            });
                let response = Client::new()
                    .post("https://api.apipod.ai/v1/images/generations")
                    .bearer_auth(env::var("APIPOD_API_KEY")?)
                    .json(&payload)
                    .send()
                    .await?
                    .error_for_status()?;

                println!("{}", response.text().await?);
                Ok(())
            }
        - lang: JavaScript
          label: JavaScript
          source: >-
            const response = await
            fetch("https://api.apipod.ai/v1/images/generations", {
              method: "POST",
              headers: {
                Authorization: `Bearer ${process.env.APIPOD_API_KEY}`,
                "Content-Type": "application/json",
              },
              body: JSON.stringify(
              {
                "aspect_ratio": "16:9",
                "model": "qwen-image-2.1-turbo",
                "n": 1,
                "prompt": "A premium product photograph on a dark studio set, precise typography, soft rim lighting, highly detailed.",
                "resolution": "2K"
                
              }
              ),
            });


            if (!response.ok) {
              throw new Error(`APIPod request failed: ${response.status} ${await response.text()}`);
            }


            console.log(await response.json());
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: APIPod API key
      description: Use your APIPod API key as a Bearer token in the Authorization header.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.