size
parameters.size is WIDTH*HEIGHT (joined with an asterisk), e.g. 1024*1024. For text-to-image and editing alike the total pixels must be between 512*512 and 2048*2048 (262,144–4,194,304) and the aspect ratio between 1:8 and 8:1; without size the model recommends a resolution from the prompt. A value that is not WIDTH*HEIGHT returns 400 from the gateway; a pixel count out of range is checked by the model service and returns 400 InvalidParameter. The actual output size is usage.output_width / usage.output_height in the response.
Common sizes
Billing tiers
Billed per image. Each output image is tiered by its own total pixels (width × height): up to 2,250,000 (1500*1500) is the 1K tier, above it the 2K tier, as reported inusage.output_image_type (qima_output_1k / qima_output_2k). Each reference image of an edit is billed as an input image (usage.input_image_count).
Cost of a request = output images × the price of their tier + input images × the input price. For example, editing one reference image with
n: 2 at 1328*1328 (1K tier): 2 × $0.03 + 1 × $0.003 = $0.063.
Before the call the balance is checked for the most the request can produce (n images, in the 2K tier when size is omitted or above 2,250,000 pixels); with an insufficient balance it returns 402 and the model is not called. The charge then follows usage in the response. Invalid requests and failed generations are not charged. The prices in the console are authoritative.

