RunAPI Qwen 2.1 API

The Qwen 2.1 API from RunAPI — 4 operation(s) for qwen 2.1.

Operations 4

POST /api/v1/qwen_2_1/edit_image Qwen 2.1 Edit-Image #
GET /api/v1/qwen_2_1/edit_image/{id} Retrieve Qwen 2.1 Edit-Image task #
POST /api/v1/qwen_2_1/text_to_image Qwen 2.1 Text-to-Image #
GET /api/v1/qwen_2_1/text_to_image/{id} Retrieve Qwen 2.1 Text-to-Image task #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/runapi:runapi-qwen-2-1-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

runapi-qwen-2-1-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: RunAPI Qwen 2.1 API
  version: v1
  description: Create and retrieve AI media tasks, or use compatible LLM protocol endpoints.
servers:
- url: https://runapi.ai
security:
- bearerAuth: []
tags:
- name: Qwen 2.1
paths:
  /api/v1/qwen_2_1/edit_image:
    post:
      tags:
      - Qwen 2.1
      summary: Qwen 2.1 Edit-Image
      description: Create an asynchronous task through the Qwen 2.1 edit image endpoint.
      operationId: task_endpoint_qwen_2_1_edit_image
      security:
      - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                model:
                  type: string
                  description: RunAPI model identifier.
                  const: qwen-2.1-edit-image
                prompt:
                  type: string
                  maxLength: 5000
                  minLength: 1
                  description: Image editing prompt. With mask_url, describes what to generate inside the white area of the mask.
                source_image_urls:
                  type: array
                  items:
                    type: string
                  maxItems: 10
                  minItems: 1
                  description: Public source image URLs; one to ten images, in the order the prompt refers to them.
                mask_url:
                  type: string
                  description: 'Public mask image URL for local editing: white marks the area to change, black is kept. Requires exactly one source image and cannot be combined with a transparent background; aspect_ratio and enable_prompt_expansion are ignored.'
                output_resolution:
                  type: string
                  enum:
                  - 1k
                  - 2k
                  default: 1k
                  description: Output image resolution.
                aspect_ratio:
                  type: string
                  enum:
                  - auto
                  - '1:1'
                  - '4:3'
                  - '3:4'
                  - '3:2'
                  - '2:3'
                  - '16:9'
                  - '9:16'
                  - '21:9'
                  - '9:21'
                  default: auto
                  description: Output aspect ratio. auto follows the first source image. Ignored when mask_url is set.
                background:
                  type: string
                  enum:
                  - opaque
                  - transparent
                  default: opaque
                  description: Background type. A transparent background requires output_format png or webp and cannot be combined with mask_url; describe only the subject in the prompt.
                output_format:
                  type: string
                  enum:
                  - png
                  - webp
                  - jpeg
                  default: png
                  description: Output image format. jpeg cannot be combined with a transparent background.
                enable_prompt_expansion:
                  type: boolean
                  default: true
                  description: Whether RunAPI expands the prompt before generation. Ignored when mask_url is set.
                seed:
                  type: integer
                  description: Integer seed for reproducible results; omit for a random seed.
                callback_url:
                  type: string
                  description: Webhook URL for asynchronous task updates.
              additionalProperties: false
              required:
              - model
              - prompt
              - source_image_urls
              allOf:
              - if:
                  allOf:
                  - properties:
                      background:
                        const: transparent
                    required:
                    - background
                  - properties:
                      output_format:
                        const: jpeg
                    required:
                    - output_format
                then:
                  not:
                    required:
                    - output_format
              - if:
                  allOf:
                  - required:
                    - mask_url
                  - properties:
                      background:
                        const: transparent
                    required:
                    - background
                then:
                  not:
                    required:
                    - mask_url
      responses:
        '202':
          description: Create acceptance
          content:
            application/json:
              schema:
                type: object
                required:
                - id
                - status
                properties:
                  id:
                    type: string
                  status:
                    type: string
                    enum:
                    - processing
                  task_replayed:
                    type: boolean
                unevaluatedProperties: false
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                oneOf:
                - type: object
                  required:
                  - error
                  properties:
                    error:
                      type: string
                      description: Human-readable error message.
                  unevaluatedProperties: false
                - type: object
                  required:
                  - error
                  - errors
                  properties:
                    error:
                      type: string
                      description: Human-readable validation summary.
                    errors:
                      type: object
                      description: Validation messages keyed by public request field, with an array of human-readable strings for each field.
                      additionalProperties:
                        type: array
                        items:
                          type: string
                  unevaluatedProperties: false
        '401':
          description: Authentication required
          content:
            application/json:
              schema:
                type: object
                required:
                - error
                properties:
                  error:
                    type: string
                    description: Human-readable error message.
                unevaluatedProperties: false
        '402':
          description: Insufficient balance
          content:
            application/json:
              schema:
                type: object
                required:
                - error
                properties:
                  error:
                    type: string
                    description: Human-readable error message.
                unevaluatedProperties: false
        '409':
          description: Request conflict
          content:
            application/json:
              schema:
                type: object
                required:
                - error
                properties:
                  error:
                    type: string
                    description: Human-readable error message.
                unevaluatedProperties: false
        '429':
          description: Api token credit limit exceeded or Rate limited
          content:
            application/json:
              schema:
                type: object
                required:
                - error
                properties:
                  error:
                    type: string
                    description: Human-readable error message.
                unevaluatedProperties: false
        '503':
          description: Service unavailable
          content:
            application/json:
              schema:
                type: object
                required:
                - error
                properties:
                  error:
                    type: string
                    description: Human-readable error message.
                unevaluatedProperties: false
        '504':
          description: Timeout error
          content:
            application/json:
              schema:
                type: object
                required:
                - error
                properties:
                  error:
                    type: string
                    description: Human-readable error message.
                unevaluatedProperties: false
  /api/v1/qwen_2_1/edit_image/{id}:
    get:
      tags:
      - Qwen 2.1
      summary: Retrieve Qwen 2.1 Edit-Image task
      description: Create an asynchronous task through the Qwen 2.1 edit image endpoint.
      operationId: task_endpoint_qwen_2_1_edit_image_retrieve
      security:
      - bearerAuth: []
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Polling processing or Polling completed or Polling failed
          content:
            application/json:
              schema:
                oneOf:
                - type: object
                  required:
                  - id
                  - status
                  properties:
                    id:
                      type: string
                    status:
                      type: string
                      enum:
                      - processing
                  unevaluatedProperties: false
                - type: object
                  required:
                  - id
                  - status
                  - images
                  - usage
                  properties:
                    id:
                      type: string
                    status:
                      type: string
                      enum:
                      - completed
                    images:
                      type: array
                      items:
                        type: object
                        required:
                        - url
                        properties:
                          url:
                            type: string
                            x-runapi-generated-media: true
                        unevaluatedProperties: false
                    usage:
                      type: object
                      properties:
                        cost:
                          type: number
                      unevaluatedProperties: false
                  unevaluatedProperties: false
                - type: object
                  required:
                  - id
                  - status
                  - error
                  properties:
                    id:
                      type: string
                    status:
                      type: string
                      enum:
                      - failed
                    error:
                      type: string
                  unevaluatedProperties: false
        '401':
          description: Polling authentication required
          content:
            application/json:
              schema:
                type: object
                required:
                - error
                properties:
                  error:
                    type: string
                    description: Human-readable error message.
                unevaluatedProperties: false
        '404':
          description: Task not found
          content:
            application/json:
              schema:
                type: object
                required:
                - error
                properties:
                  error:
                    type: string
                    description: Human-readable error message.
                unevaluatedProperties: false
  /api/v1/qwen_2_1/text_to_image:
    post:
      tags:
      - Qwen 2.1
      summary: Qwen 2.1 Text-to-Image
      description: Create an asynchronous task through the Qwen 2.1 text to image endpoint.
      operationId: task_endpoint_qwen_2_1_text_to_image
      security:
      - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                model:
                  type: string
                  description: RunAPI model identifier.
                  const: qwen-2.1-text-to-image
                prompt:
                  type: string
                  maxLength: 5000
                  minLength: 1
                  description: Image generation prompt.
                output_resolution:
                  type: string
                  enum:
                  - 1k
                  - 2k
                  default: 1k
                  description: Output image resolution.
                aspect_ratio:
                  type: string
                  enum:
                  - '1:1'
                  - '4:3'
                  - '3:4'
                  - '3:2'
                  - '2:3'
                  - '16:9'
                  - '9:16'
                  - '21:9'
                  - '9:21'
                  default: '1:1'
                  description: Output aspect ratio.
                background:
                  type: string
                  enum:
                  - opaque
                  - transparent
                  default: opaque
                  description: Background type. A transparent background requires output_format png or webp; describe only the subject in the prompt.
                output_format:
                  type: string
                  enum:
                  - png
                  - webp
                  - jpeg
                  default: png
                  description: Output image format. jpeg cannot be combined with a transparent background.
                enable_prompt_expansion:
                  type: boolean
                  default: true
                  description: Whether RunAPI expands the prompt before generation.
                enable_safety_checker:
                  type: boolean
                  default: false
                  description: Whether RunAPI checks generated content for safety.
                seed:
                  type: integer
                  description: Integer seed for reproducible results; omit for a random seed.
                callback_url:
                  type: string
                  description: Webhook URL for asynchronous task updates.
              additionalProperties: false
              required:
              - model
              - prompt
              allOf:
              - if:
                  allOf:
                  - properties:
                      background:
                        const: transparent
                    required:
                    - background
                  - properties:
                      output_format:
                        const: jpeg
                    required:
                    - output_format
                then:
                  not:
                    required:
                    - output_format
      responses:
        '202':
          description: Create acceptance
          content:
            application/json:
              schema:
                type: object
                required:
                - id
                - status
                properties:
                  id:
                    type: string
                  status:
                    type: string
                    enum:
                    - processing
                  task_replayed:
                    type: boolean
                unevaluatedProperties: false
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                oneOf:
                - type: object
                  required:
                  - error
                  properties:
                    error:
                      type: string
                      description: Human-readable error message.
                  unevaluatedProperties: false
                - type: object
                  required:
                  - error
                  - errors
                  properties:
                    error:
                      type: string
                      description: Human-readable validation summary.
                    errors:
                      type: object
                      description: Validation messages keyed by public request field, with an array of human-readable strings for each field.
                      additionalProperties:
                        type: array
                        items:
                          type: string
                  unevaluatedProperties: false
        '401':
          description: Authentication required
          content:
            application/json:
              schema:
                type: object
                required:
                - error
                properties:
                  error:
                    type: string
                    description: Human-readable error message.
                unevaluatedProperties: false
        '402':
          description: Insufficient balance
          content:
            application/json:
              schema:
                type: object
                required:
                - error
                properties:
                  error:
                    type: string
                    description: Human-readable error message.
                unevaluatedProperties: false
        '409':
          description: Request conflict
          content:
            application/json:
              schema:
                type: object
                required:
                - error
                properties:
                  error:
                    type: string
                    description: Human-readable error message.
                unevaluatedProperties: false
        '429':
          description: Api token credit limit exceeded or Rate limited
          content:
            application/json:
              schema:
                type: object
                required:
                - error
                properties:
                  error:
                    type: string
                    description: Human-readable error message.
                unevaluatedProperties: false
        '503':
          description: Service unavailable
          content:
            application/json:
              schema:
                type: object
                required:
                - error
                properties:
                  error:
                    type: string
                    description: Human-readable error message.
                unevaluatedProperties: false
        '504':
          description: Timeout error
          content:
            application/json:
              schema:
                type: object
                required:
                - error
                properties:
                  error:
                    type: string
                    description: Human-readable error message.
                unevaluatedProperties: false
  /api/v1/qwen_2_1/text_to_image/{id}:
    get:
      tags:
      - Qwen 2.1
      summary: Retrieve Qwen 2.1 Text-to-Image task
      description: Create an asynchronous task through the Qwen 2.1 text to image endpoint.
      operationId: task_endpoint_qwen_2_1_text_to_image_retrieve
      security:
      - bearerAuth: []
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Polling processing or Polling completed or Polling failed
          content:
            application/json:
              schema:
                oneOf:
                - type: object
                  required:
                  - id
                  - status
                  properties:
                    id:
                      type: string
                    status:
                      type: string
                      enum:
                      - processing
                  unevaluatedProperties: false
                - type: object
                  required:
                  - id
                  - status
                  - images
                  - usage
                  properties:
                    id:
                      type: string
                    status:
                      type: string
                      enum:
                      - completed
                    images:
                      type: array
                      items:
                        type: object
                        required:
                        - url
                        properties:
                          url:
                            type: string
                            x-runapi-generated-media: true
                        unevaluatedProperties: false
                    usage:
                      type: object
                      properties:
                        cost:
                          type: number
                      unevaluatedProperties: false
                  unevaluatedProperties: false
                - type: object
                  required:
                  - id
                  - status
                  - error
                  properties:
                    id:
                      type: string
                    status:
                      type: string
                      enum:
                      - failed
                    error:
                      type: string
                  unevaluatedProperties: false
        '401':
          description: Polling authentication required
          content:
            application/json:
              schema:
                type: object
                required:
                - error
                properties:
                  error:
                    type: string
                    description: Human-readable error message.
                unevaluatedProperties: false
        '404':
          description: Task not found
          content:
            application/json:
              schema:
                type: object
                required:
                - error
                properties:
                  error:
                    type: string
                    description: Human-readable error message.
                unevaluatedProperties: false
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API token