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

# Try an outfit on a person

> By default returns an array of pending jobs. With create_version=true, returns the person image with a newly linked version; track that version’s source_image_id.

Start with `num_images: 1`; omitting it also creates one output. [See request settings](/api-reference/models#image-quality-and-proportions).

[Track jobs and versions](/api-reference/jobs-and-versions).


## OpenAPI

````yaml POST /images/virtual-try-on
openapi: 3.0.3
info:
  title: bitStudio API
  version: '2026-09-06'
  description: >-
    Core Studio image, video, and reusable-asset workflows. Requests use a
    workspace-scoped API key and the account’s feature access and credits.
    Generation is asynchronous.
  contact:
    name: bitStudio support
    email: hello@bitstudio.ai
servers:
  - url: https://api.bitstudio.ai
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Images
  - name: Video
  - name: Assets
paths:
  /images/virtual-try-on:
    post:
      tags:
        - Images
      summary: Try an outfit on a person
      description: >-
        By default returns an array of pending jobs. With create_version=true,
        returns the person image with a newly linked version; track that
        version’s source_image_id.
      operationId: virtualTryOn
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TryOnInput'
            example:
              person_image_id: 11111111-1111-4111-8111-111111111111
              outfit_asset_id: 22222222-2222-4222-8222-222222222222
              model: nano-banana-2
              resolution: standard
              num_images: 1
              speed: fast
      responses:
        '202':
          description: >-
            By default returns an array of pending jobs. With
            create_version=true, returns the person image with a newly linked
            version; track that version’s source_image_id.
          content:
            application/json:
              schema:
                oneOf:
                  - type: array
                    items:
                      $ref: '#/components/schemas/Image'
                    description: ''
                  - $ref: '#/components/schemas/Image'
              example:
                - id: 11111111-1111-4111-8111-111111111111
                  status: pending
                  path: null
                  width_px: null
                  height_px: null
                  created_timestamp: '2026-09-06T12:00:00Z'
        default:
          description: >-
            Request rejected or service error. See the errors and recovery
            guide.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    TryOnInput:
      type: object
      properties:
        person_image_id:
          type: string
          description: Uploaded person image. Supply this or person_image_url.
          format: uuid
        person_image_url:
          type: string
          description: Direct URL of a person photo.
          format: uri
        person_version_id:
          type: string
          description: Optional source version belonging to person_image_id.
          format: uuid
        outfit_asset_id:
          type: string
          description: Reusable outfit asset. Supply an outfit asset, image, or URL.
          format: uuid
        outfit_image_id:
          type: string
          description: Uploaded garment image.
          format: uuid
        outfit_image_url:
          type: string
          description: Direct garment photo URL.
          format: uri
        outfit_asset_ids:
          type: array
          items:
            type: string
            description: Resource ID.
            format: uuid
          description: Multiple garment assets; supported models only.
          maxItems: 3
        outfit_image_ids:
          type: array
          items:
            type: string
            description: Resource ID.
            format: uuid
          description: Multiple garment uploads; supported models only.
          maxItems: 3
        outfit_image_urls:
          type: array
          items:
            type: string
            description: ''
            format: uri
          description: Multiple garment URLs; supported models only.
          maxItems: 3
        model:
          type: string
          description: >-
            Use nano-banana-2 for this example. Other model availability and
            multi-outfit support vary.
          example: nano-banana-2
        resolution:
          type: string
          description: >-
            Output quality. Send explicitly. Pixel dimensions depend on the
            image model.
          enum:
            - standard
            - high
          example: standard
          default: standard
        num_images:
          type: integer
          description: Number of outputs. Defaults to 1. Account limits still apply.
          minimum: 1
          maximum: 8
          example: 1
          default: 1
        prompt:
          type: string
          description: Optional styling instructions.
        speed:
          type: string
          description: >-
            Processing option. fast is used in the example; accepted values
            depend on the model.
          example: fast
        create_version:
          type: boolean
          description: >-
            false returns an array of new jobs. true links a version to the
            person image and returns that parent image.
          default: false
        asset_ids:
          type: array
          items:
            type: string
          description: >-
            Additional reusable reference asset IDs. Supported types depend on
            the operation.
        aspect_ratio:
          type: string
          description: Optional model-dependent output ratio.
        style:
          type: string
          description: Optional style directions.
        seed:
          type: integer
          description: Optional seed; it does not guarantee identical results.
        cf_turnstile_response:
          type: string
          description: Embedded storefront metadata. Omit for standard Studio integrations.
        shopify_product_id:
          type: string
          description: Embedded storefront metadata. Omit for standard Studio integrations.
        shopify_customer_id:
          type: string
          description: Embedded storefront metadata. Omit for standard Studio integrations.
        shopify_product_handle:
          type: string
          description: Embedded storefront metadata. Omit for standard Studio integrations.
        shopify_product_title:
          type: string
          description: Embedded storefront metadata. Omit for standard Studio integrations.
        customer_email:
          type: string
          description: Embedded storefront metadata. Omit for standard Studio integrations.
      additionalProperties: false
    Image:
      type: object
      properties:
        id:
          type: string
          description: Resource ID.
          format: uuid
        status:
          type: string
          description: Job state. Only completed has a finished result.
          enum:
            - pending
            - generating
            - completed
            - failed
            - policy_blocked
            - nsfw_filtered
        path:
          type: string
          description: Result URL. Can be null while the job is pending.
          nullable: true
        watermarked_path:
          type: string
          description: ''
          nullable: true
        width_px:
          type: integer
          description: ''
          nullable: true
        height_px:
          type: integer
          description: ''
          nullable: true
        size_bytes:
          type: integer
          description: ''
          nullable: true
        extension:
          type: string
          description: ''
          nullable: true
        is_generated:
          type: boolean
          description: ''
        for_training:
          type: boolean
          description: Whether the upload is a reusable asset reference.
        task:
          type: string
          description: Operation that created this job.
          nullable: true
        type:
          type: string
          description: ''
          nullable: true
        created_timestamp:
          type: string
          description: ''
          format: date-time
        finish_timestamp:
          type: string
          description: ''
          format: date-time
          nullable: true
        fail_reason:
          type: string
          description: Human-readable failure detail.
          nullable: true
        failure_code:
          type: string
          description: Machine-readable failure category, when available.
          enum:
            - input_rejected
            - provider_unavailable
            - queue_timeout
            - policy_blocked
          nullable: true
        asset_ids:
          type: array
          items:
            type: string
            description: Resource ID.
            format: uuid
          description: Linked reusable assets.
          nullable: true
        versions:
          type: array
          items:
            $ref: '#/components/schemas/ImageVersion'
          description: >-
            Related versions. May be omitted or empty. Never infer a new version
            is completed from the parent status.
      required:
        - id
        - status
    Error:
      type: object
      properties:
        error:
          type: string
          description: Some handlers return a plain error string.
        code:
          type: string
          description: Structured error code, when available.
        message:
          type: string
          description: Structured human-readable error, when available.
        cta:
          type: boolean
          description: Whether the response includes an account action.
        next_action:
          type: string
          description: Suggested action, such as a plan or credit change.
        current_plan:
          type: string
          description: ''
        user_message:
          type: string
          description: User-facing explanation when present.
        extra_context:
          type: string
          description: Additional error context when present.
      description: >-
        Error shapes differ by endpoint. Read message or error; preserve the
        HTTP status and code. Additional context fields may be returned.
    ImageVersion:
      type: object
      properties:
        id:
          type: string
          description: Version ID. Save this to correlate the operation.
          format: uuid
        image_id:
          type: string
          description: Parent image ID.
          format: uuid
        source_image_id:
          type: string
          description: >-
            Child job ID. Poll GET /images/{id} with this ID to track
            processing.
          format: uuid
          nullable: true
        source_version_id:
          type: string
          description: Resource ID.
          format: uuid
          nullable: true
        version_type:
          type: string
          description: For example edited, upscaled, or video.
        status:
          type: string
          description: Job state. Only completed has a finished result.
          enum:
            - pending
            - generating
            - completed
            - failed
            - policy_blocked
            - nsfw_filtered
        path:
          type: string
          description: Result URL; may be empty while processing.
        width_px:
          type: integer
          description: ''
        height_px:
          type: integer
          description: ''
        created_timestamp:
          type: string
          description: ''
          format: date-time
        fail_reason:
          type: string
          description: ''
          nullable: true
        failure_code:
          type: string
          description: ''
          nullable: true
      required:
        - id
        - image_id
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Create an API key in Studio → account menu → API Keys. Keep it on your
        server.

````