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

# Estimate Image Generation Cost



## OpenAPI

````yaml https://api.mynth.io/openapi.json post /image/generate/estimate
openapi: 3.1.0
info:
  title: Mynth
  description: Mynth API
  version: 1.0.0
servers: []
security: []
paths:
  /image/generate/estimate:
    post:
      tags:
        - Image
      summary: Estimate Image Generation Cost
      operationId: postImageGenerateEstimate
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                prompt:
                  type: string
                  title: Prompt
                  description: Positive prompt.
                  examples:
                    - Cute Cat
                  maxLength: 8192
                output:
                  type: object
                  properties:
                    format:
                      enum:
                        - jpg
                        - png
                        - webp
                    quality:
                      type: number
                      maximum: 100
                      minimum: 1
                  required:
                    - format
                    - quality
                  default:
                    format: webp
                    quality: 80
                model:
                  anyOf:
                    - const: alibaba/qwen-image-2.0
                      examples:
                        - black-forest-labs/flux.2-pro
                    - const: alibaba/qwen-image-2.0-pro
                      examples:
                        - black-forest-labs/flux.2-pro
                    - const: auto
                      title: Auto model selection
                      description: Model is selected based on the prompt.
                      examples:
                        - black-forest-labs/flux.2-pro
                    - const: black-forest-labs/flux-1-schnell
                      examples:
                        - black-forest-labs/flux.2-pro
                    - const: black-forest-labs/flux-virtual-try-on
                      examples:
                        - black-forest-labs/flux.2-pro
                    - const: black-forest-labs/flux.1-dev
                      examples:
                        - black-forest-labs/flux.2-pro
                    - const: black-forest-labs/flux.2-dev
                      examples:
                        - black-forest-labs/flux.2-pro
                    - const: black-forest-labs/flux.2-flex
                      examples:
                        - black-forest-labs/flux.2-pro
                    - const: black-forest-labs/flux.2-klein-4b
                      examples:
                        - black-forest-labs/flux.2-pro
                    - const: black-forest-labs/flux.2-max
                      examples:
                        - black-forest-labs/flux.2-pro
                    - const: black-forest-labs/flux.2-pro
                      examples:
                        - black-forest-labs/flux.2-pro
                    - const: bytedance/seedream-5.0-lite
                      examples:
                        - black-forest-labs/flux.2-pro
                    - const: google/gemini-3-pro-image-preview
                      examples:
                        - black-forest-labs/flux.2-pro
                    - const: google/gemini-3.1-flash-image
                      examples:
                        - black-forest-labs/flux.2-pro
                    - const: google/gemini-3.1-flash-lite-image
                      examples:
                        - black-forest-labs/flux.2-pro
                    - const: ideogram/remove-background
                      examples:
                        - black-forest-labs/flux.2-pro
                    - const: imagineart/imagineart-1.5-pro
                      examples:
                        - black-forest-labs/flux.2-pro
                    - const: imagineart/imagineart-2.0
                      examples:
                        - black-forest-labs/flux.2-pro
                    - const: john6666/bismuth-illustrious-mix
                      examples:
                        - black-forest-labs/flux.2-pro
                    - const: klingai/kling-image-3.0
                      examples:
                        - black-forest-labs/flux.2-pro
                    - const: klingai/kling-image-o3
                      examples:
                        - black-forest-labs/flux.2-pro
                    - const: krea/krea-2-large
                      examples:
                        - black-forest-labs/flux.2-pro
                    - const: krea/krea-2-medium
                      examples:
                        - black-forest-labs/flux.2-pro
                    - const: krea/krea-2-turbo
                      examples:
                        - black-forest-labs/flux.2-pro
                    - const: luma/uni-1
                      examples:
                        - black-forest-labs/flux.2-pro
                    - const: luma/uni-1-max
                      examples:
                        - black-forest-labs/flux.2-pro
                    - const: openai/gpt-image-2
                      examples:
                        - black-forest-labs/flux.2-pro
                    - const: prunaai/p-image-try-on
                      examples:
                        - black-forest-labs/flux.2-pro
                    - const: purplesmartai/pony-diffusion-v6-xl
                      examples:
                        - black-forest-labs/flux.2-pro
                    - const: recraft/recraft-v4
                      examples:
                        - black-forest-labs/flux.2-pro
                    - const: recraft/recraft-v4-pro
                      examples:
                        - black-forest-labs/flux.2-pro
                    - const: sourceful/riverflow-2.0-pro
                      examples:
                        - black-forest-labs/flux.2-pro
                    - const: tongyi-mai/z-image
                      examples:
                        - black-forest-labs/flux.2-pro
                    - const: tongyi-mai/z-image-turbo
                      examples:
                        - black-forest-labs/flux.2-pro
                    - const: wan/wan2.6-image
                      examples:
                        - black-forest-labs/flux.2-pro
                    - const: wan/wan2.7-image
                      examples:
                        - black-forest-labs/flux.2-pro
                    - const: wan/wan2.7-image-pro
                      examples:
                        - black-forest-labs/flux.2-pro
                    - const: xai/grok-imagine-image
                      examples:
                        - black-forest-labs/flux.2-pro
                    - const: xai/grok-imagine-image-quality
                      examples:
                        - black-forest-labs/flux.2-pro
                  examples:
                    - black-forest-labs/flux.2-pro
                  default: auto
                count:
                  type: number
                  maximum: 20
                  minimum: 1
                  default: 1
                access:
                  type: object
                  description: >-
                    Controls whether the create-task response should include a
                    short-lived Public Access Token.


                    That token can be passed to browser or client-side code for
                    polling task status and task images

                    without exposing your API key.
                  properties:
                    pat:
                      type: object
                      properties:
                        enabled:
                          type: boolean
                          default: true
                  required:
                    - pat
                destination:
                  type: string
                  examples:
                    - bunny-prod
                  maxLength: 64
                  minLength: 1
                inputs:
                  type: array
                  maxItems: 20
                  items:
                    anyOf:
                      - type: string
                        maxLength: 2048
                        minLength: 1
                      - type: object
                        properties:
                          source:
                            type: object
                            properties:
                              type:
                                const: url
                              url:
                                type: string
                            required:
                              - type
                              - url
                          type:
                            const: image
                          as:
                            enum:
                              - auto
                              - garment
                              - person
                              - pose
                              - reference
                              - source
                        required:
                          - source
                          - type
                        additionalProperties: false
                magic_prompt:
                  const: true
                metadata:
                  type: object
                negative_prompt:
                  type: string
                  maxLength: 8192
                rating:
                  anyOf:
                    - type: object
                      title: Custom Content Rating
                      description: Content rating
                      examples:
                        - mode: custom
                          levels:
                            - value: <13
                              description: Safe for Children
                            - value: <18
                              description: Safe for Teens
                            - value: 18+
                              description: Adults Only
                      properties:
                        levels:
                          type: array
                          maxItems: 7
                          minItems: 2
                          items:
                            type: object
                            properties:
                              description:
                                type: string
                                maxLength: 150
                                minLength: 1
                              value:
                                type: string
                                maxLength: 24
                                minLength: 1
                            required:
                              - description
                              - value
                        mode:
                          const: custom
                      required:
                        - levels
                        - mode
                    - type: object
                      title: Default Content Rating (nsfw/sfw)
                      description: Content rating
                      examples:
                        - mode: nsfw_sfw
                      properties:
                        mode:
                          const: nsfw_sfw
                      required:
                        - mode
                    - const: true
                size:
                  anyOf:
                    - type: object
                      properties:
                        aspectRatio:
                          enum:
                            - '16:9'
                            - '1:1'
                            - '1:2'
                            - '21:9'
                            - '2:1'
                            - '2:3'
                            - '3:2'
                            - '3:4'
                            - '4:3'
                            - '4:5'
                            - '5:4'
                            - '9:16'
                        type:
                          const: aspect_ratio
                        scale:
                          enum:
                            - 4k
                            - base
                          default: base
                      required:
                        - aspectRatio
                        - type
                    - type: object
                      properties:
                        type:
                          const: auto
                      required:
                        - type
                    - const: '16:9'
                    - const: 16:9_4k
                    - const: '1:1'
                    - const: 1:1_4k
                    - const: '1:2'
                    - const: 1:2_4k
                    - const: '21:9'
                    - const: 21:9_4k
                    - const: '2:1'
                    - const: 2:1_4k
                    - const: '2:3'
                    - const: 2:3_4k
                    - const: '3:2'
                    - const: 3:2_4k
                    - const: '3:4'
                    - const: 3:4_4k
                    - const: '4:3'
                    - const: 4:3_4k
                    - const: '4:5'
                    - const: 4:5_4k
                    - const: '5:4'
                    - const: 5:4_4k
                    - const: '9:16'
                    - const: 9:16_4k
                    - const: auto
                    - const: landscape
                    - const: landscape_wide
                    - const: portrait
                    - const: portrait_tall
                    - const: square
                webhook:
                  type: object
                  properties:
                    custom:
                      type: array
                      maxItems: 5
                      minItems: 1
                      items:
                        type: object
                        properties:
                          url:
                            type: string
                        required:
                          - url
                    dashboard:
                      const: false
                      description: >-
                        Disable dashboard-managed webhooks for this task.
                        Request-level custom webhooks are still sent.
              required:
                - prompt
              additionalProperties: false
      responses:
        '200':
          description: Image generation request validated and cost estimated
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      currency:
                        const: usd
                      estimateKind:
                        anyOf:
                          - const: exact
                            description: >-
                              "exact" when the model is pinned; "upper_bound"
                              for `model: "auto"`, which reserves a flat
                              per-image ceiling until a concrete model is
                              selected.
                          - const: upper_bound
                            description: >-
                              "exact" when the model is pinned; "upper_bound"
                              for `model: "auto"`, which reserves a flat
                              per-image ceiling until a concrete model is
                              selected.
                        description: >-
                          "exact" when the model is pinned; "upper_bound" for
                          `model: "auto"`, which reserves a flat per-image
                          ceiling until a concrete model is selected.
                      estimatedCost:
                        type: string
                        description: >-
                          Estimated cost in USD for the request. Nothing is
                          generated or charged.
                        examples:
                          - '0.03'
                    required:
                      - currency
                      - estimateKind
                      - estimatedCost
                required:
                  - data
      security:
        - apiKeyAuth: []
        - oauthAuth: []
components:
  securitySchemes:
    apiKeyAuth:
      type: http
      scheme: bearer
      description: 'Mynth API key sent as `Authorization: Bearer <api-key>`.'
    oauthAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: 'OAuth access token sent as `Authorization: Bearer <access-token>`.'

````