API reference

Get a persistent image quote

POST/v1/image-quotes

Validates inputs and permissions without locking images. Quotes are valid for 60 seconds; task creation revalidates routing, prices, and the request. A disabled service returns 503. Editing is charged by the selected specification base fee plus a surcharge for input images after the first; upscaling is charged by scale. The quote freezes input order, count, specifications, and prices. Missing prices or unsupported parameters prevent quote creation.

Authentication and permissions

Use your current GloopAPI key. Available models, capabilities and permissions depend on its catalog and the endpoint documentation.

Authorization: Bearer $GLOOP_API_KEY

Authentication schemes: BearerAuth

Request

Request body · application/json

Type
object
Required fields
model
Additional properties
false
Description
Defaults to generation. Editing requires prompt and references. Upscaling requires one reference image and scale, and does not accept prompt. Editing and upscaling require n=1. Specifications must come from the capability catalog for the selected operation. background_remove removes the background from one image without a prompt and returns a transparent PNG; it does not accept scale, creativity, moderation options, or generation specifications. Use references for uploaded assets, files, or safe HTTPS images.

Request body required

  • modelstringRequired

    Public model ID from the current key's catalog.

    Maximum length
    191
  • promptstringOptional

    Generation: required, nonempty, and at most 32000 UTF-8 bytes. Editing: required and nonempty, limited by the model's max_prompt_characters and capped at 32768 Unicode characters. Upscaling and background removal: omit or leave empty.

  • sizestringOptional

    Choose a supported size. Aspect-ratio models use it to select proportions, without guaranteeing exact pixel dimensions.

  • nintegerOptional

    Omitted or 0 values normalize to 1. The actual maximum is max_n from image-models; do not treat the global maximum as a model capability.

    Default value
    1
    Minimum
    1
    Maximum
    6
  • referencesarrayOptional

    Select only one of file_id, asset_id, or url per item; actual quantity is governed by max_references.

    Maximum items
    14
    references child fields (1)
    • []objectOptional
      [] child fields (3)
      • file_idstringOptional

        Public ID of a managed file for the same account and key.

      • asset_idstringOptional

        Upload asset ID for the same account and key.

      • urlstringOptional

        Public HTTPS URL; userinfo and fragment are prohibited, and SSRF checks apply.

        Format
        "uri"
      oneOf branch 1

      Required in this branch: file_id

      oneOf branch 2

      Required in this branch: asset_id

      oneOf branch 3

      Required in this branch: url

  • source_task_idstringOptional

    Optional source task belonging to the same key, for provenance only; does not replace references.

    Maximum length
    64
  • quote_idstringOptional

    Must be valid and match the request when creating a task; ignored in quote requests.

  • moderationstringOptional

    Models supporting this capability default to moderation=auto; low requests unblurred output without bypassing model restrictions. Models without this capability reject an explicit moderation parameter. Use the actual public model ID; a name suffix does not change model behavior.

    Enum
    ["auto","low"]
  • operationstringOptional
    Default value
    "generate"
    Enum
    ["generate","edit","upscale","background_remove"]
  • scaleintegerOptional

    Upscaling only. Requests exceeding 16,777,216 target pixels are rejected; the scale is not reduced automatically.

    Enum
    [2,4]
  • creativitynumberOptional
    Default value
    0.01
    Minimum
    0
    Maximum
    0.02
  • output_formatstringOptional

    Editing only; defaults to png.

    Enum
    ["png","jpeg","jpg","webp"]
  • resolutionstringOptional

    Select values from the model's operation_options. When tiers are available, resolution/quality must be specified explicitly. Configurations without prices cannot be used.

  • qualitystringOptional

    Select values from the model's operation_options. When tiers are available, resolution/quality must be specified explicitly. Configurations without prices cannot be used.

  • aspect_ratiostringOptional

    Select values from the model's operation_options. When tiers are available, resolution/quality must be specified explicitly. Configurations without prices cannot be used.

Responses and errors

HTTP 200

Persistent image quote retrieved successfully

application/json

Type
object
Required fields
pricing_noteidexpires_atreserved_quotaestimated_costcurrency
  • pricing_notestringRequired

    Model pricing description; final settlement uses confirmed metering.

  • idstringRequired

    Public identifier of this object, used for its corresponding detail path.

  • expires_atintegerRequired

    Expiration in Unix seconds; 0 means no fixed expiration.

  • reserved_quotaintegerRequired

    Reserved quota in platform quota units, not a USD amount.

  • estimated_costnumberRequired

    Estimated selling charge in the quote currency.

  • currencystringRequired

    Quote/billing currency.

  • billingobjectOptional

    Caller USD charge converted using the task’s frozen quota scale. final_amount is present only after settlement or refund; a missing amount does not mean zero cost.

    billing child fields (4)
    • currencystringRequired
      Enum
      ["USD"]
    • reserved_amountstringRequired

      Reserved USD amount as a decimal string.

    • final_amountstringOptional

      Final USD charge after settlement or refund. Omitted while settlement is pending.

    • maximum_amountstringOptional

      Certified maximum USD wallet charge under the frozen image quote. Missing means no maximum is certified; reserved_amount alone is not a maximum.

HTTP 400

Invalid request fields or parameters.

application/json

Type
object
Required fields
error

HTTP 401

The key is missing, invalid, expired, or revoked.

application/json

Type
object
Required fields
error

HTTP 403

Insufficient IP, account, model, or tool permissions.

application/json

Type
object
Required fields
error

HTTP 404

Object/capability unavailable, or feature switch disabled.

application/json

Type
object
Required fields
error

HTTP 409

Idempotency/quote conflict, object not ready, or still referenced.

application/json

Type
object
Required fields
error

HTTP 429

Request/queue rate limit.

application/json

Type
object
Required fields
error

HTTP 500

Internal authentication or data storage failure.

application/json

Type
object
Required fields
error

HTTP 503

Service, pricing, or storage unavailable.

application/json

Type
object
Required fields
error