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

# Generate product photos

> Returns an array of pending image jobs. Save every id and poll each job until completed, failed, or policy_blocked.

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/generate
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/generate:
    post:
      tags:
        - Images
      summary: Generate product photos
      description: >-
        Returns an array of pending image jobs. Save every id and poll each job
        until completed, failed, or policy_blocked.
      operationId: generateImages
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GenerateInput'
            example:
              model_version: nano-banana-2
              generate_mode: presets
              model_text: An adult fashion model
              outfit_image_ids:
                - 11111111-1111-4111-8111-111111111111
              prompt: Full-length front view in a white studio, soft shadows.
              resolution: standard
              aspect_ratio: '3:4'
              num_images: 1
      responses:
        '202':
          description: >-
            Returns an array of pending image jobs. Save every id and poll each
            job until completed, failed, or policy_blocked.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Image'
                description: ''
              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:
    GenerateInput:
      type: object
      properties:
        asset_ids:
          type: array
          items:
            type: string
            description: Resource ID.
            format: uuid
          description: >-
            Avatar, preset, pose, set, or style asset IDs. Use at most one
            preset or set in total.
        outfit_asset_ids:
          type: array
          items:
            type: string
            description: Resource ID.
            format: uuid
          description: Reusable outfit references. Use one source form per product.
          maxItems: 3
        outfit_image_ids:
          type: array
          items:
            type: string
            description: Resource ID.
            format: uuid
          description: Previously uploaded garment images.
          maxItems: 3
        outfit_image_urls:
          type: array
          items:
            type: string
            description: ''
            format: uri
          description: Direct garment image URLs accessible to the service.
          maxItems: 3
        outfit_asset_id:
          type: string
          description: Single-outfit alternative to outfit_asset_ids.
          format: uuid
        outfit_image_id:
          type: string
          description: Single-image alternative to outfit_image_ids.
          format: uuid
        outfit_image_url:
          type: string
          description: Single-URL alternative to outfit_image_urls.
          format: uri
        prompt:
          type: string
          description: Composition or extra preset directions.
        model_text:
          type: string
          description: Describe the avatar when not selecting one from the library.
        outfit_text:
          type: string
          description: How the selected garment should be worn.
        set_text:
          type: string
          description: Setting directions when needed.
        generate_mode:
          type: string
          description: Use presets for the standard reference workflow.
          enum:
            - presets
            - legacy
          example: presets
        model_version:
          type: string
          description: >-
            Image model identifier. nano-banana-2 is used in this guide;
            availability depends on your account.
          example: nano-banana-2
        resolution:
          type: string
          description: >-
            Output quality. Send explicitly. Pixel dimensions depend on the
            image model.
          enum:
            - standard
            - high
          example: standard
        aspect_ratio:
          type: string
          description: >-
            Model-dependent output ratio. 3:4 is supported by nano-banana-2 and
            nano-banana-pro.
          example: '3:4'
        num_images:
          type: integer
          description: Number of outputs. Defaults to 1. Account limits still apply.
          minimum: 1
          maximum: 8
          example: 1
          default: 1
        seed:
          type: integer
          description: >-
            Optional seed. It does not guarantee identical results across models
            or changes.
        tutorial_id:
          type: string
          description: Studio onboarding identifier. Omit for normal generation.
        style:
          type: string
          description: Optional style directions.
        style_id:
          type: string
          description: Optional saved style asset ID.
        set_id:
          type: string
          description: >-
            Legacy set asset ID. Prefer a preset in asset_ids for the standard
            workflow.
        set_mode:
          type: string
          description: >-
            Legacy scene mode. Use generate_mode: presets for the standard
            workflow.
      required:
        - resolution
      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.

````