{"input_schema":{"type":"object","properties":{"prompt":{"type":"string","description":"What to draw, in plain language.","examples":["A paper airplane over a city at dusk, flat illustration"],"maxLength":32000},"aspect_ratio":{"type":"string","description":"Shape of the image: 1:1; flat-price routes also accept 16:9 or 9:16; native medium also accepts 3:2 or 2:3. Square when omitted.","examples":["1:1"]},"resolution":{"type":"string","description":"Size class of the image: 1K; flat-price routes also accept 2K or 4K. 1K when omitted.","examples":["1K"]},"quality":{"type":"string","description":"Image quality. Consult pricing_routes for any configured flat-price generation; other requests use native token billing.","enum":["auto","low","medium","high"],"default":"medium","examples":["medium"]}},"required":["prompt"],"additionalProperties":true,"examples":[{"prompt":"A paper airplane over a city at dusk, flat illustration"}]},"output_schema":{"type":"object","description":"After COMPLETED, decode run.output.data[0].b64_json from base64 to save the image.","additionalProperties":true},"addons_schema":{"type":"object","additionalProperties":false},"capability_id":"gptimage.generate","session_compatible":true,"pricing_available":true,"id":"openai/gpt-image-2","object":"endpoint","provider":"openai","endpoint":"gpt-image-2","model_category":"image","name":"gpt-image-2","summary":"Generate an image from a written description.","description":"Generate an image from a text prompt. The request may return RUNNING before the image is ready; poll GET /v1/runs/{runId} until COMPLETED. Returns one image. Configured flat-price generation supports square, landscape and portrait: 1K is 1024×1024, 1360×768 or 768×1360; 2K is 2048×2048, 2736×1536 or 1536×2736; 4K is 2880×2880, 3840×2160 or 2160×3840. Landscape and portrait use 16:9 and 9:16. Other routes support 1K only: low/high square and medium square, 3:2 or 2:3. Medium is the default.","unit":"token","price_per_unit":null,"list_price_per_unit":null,"pricing":[{"meter":"INPUT_TOKEN","unit":"token","price_per_unit":"0.000003575","list_price_per_unit":"0.000005"},{"meter":"OUTPUT_TOKEN","unit":"token","price_per_unit":"0","list_price_per_unit":"0"},{"meter":"IMAGE_OUTPUT_TOKEN","unit":"token","price_per_unit":"0.00002145","list_price_per_unit":"0.00003"}],"reports_cost":false,"input_fields":[{"name":"prompt","type":"string","required":true,"description":"What to draw, in plain language.","example":"A paper airplane over a city at dusk, flat illustration","max":32000},{"name":"aspect_ratio","type":"string","required":false,"description":"Shape of the image: 1:1; flat-price routes also accept 16:9 or 9:16; native medium also accepts 3:2 or 2:3. Square when omitted.","example":"1:1"},{"name":"resolution","type":"string","required":false,"description":"Size class of the image: 1K; flat-price routes also accept 2K or 4K. 1K when omitted.","example":"1K"},{"name":"quality","type":"string","required":false,"description":"Image quality. Consult pricing_routes for any configured flat-price generation; other requests use native token billing.","example":"medium","default":"medium","enum_values":["auto","low","medium","high"]}],"example_request":{"provider":"openai","endpoint":"gpt-image-2","input":{"prompt":"A paper airplane over a city at dusk, flat illustration"}},"output":"After COMPLETED, decode run.output.data[0].b64_json from base64 to save the image.","limits":{"request_bytes":1000000,"timeout_ms":540000,"input_characters":{"field":"prompt","max":32000},"audio_bytes":null},"pricing_routes":[{"label":"Single image generation","instruction":"Flat price for prompt, quality auto, low, medium or high (medium when omitted), aspect_ratio 1:1, 16:9 or 9:16 (square when omitted), and resolution 1K, 2K or 4K (1K when omitted); no additional fields. 4K square is 2880x2880.","matches_example":true,"unit":"image","pricing_tiers":[{"input_field":"resolution","input_value":"1K","input_conditions":{"resolution":"1K"},"is_default":true,"available":true,"unit":"image","price_per_unit":"0.024745896717","list_price_per_unit":"0.03457579533"},{"input_field":"resolution","input_value":"2K","input_conditions":{"resolution":"2K"},"is_default":false,"available":true,"unit":"image","price_per_unit":"0.029695076061","list_price_per_unit":"0.041490954396"},{"input_field":"resolution","input_value":"4K","input_conditions":{"resolution":"4K"},"is_default":false,"available":true,"unit":"image","price_per_unit":"0.032994528957","list_price_per_unit":"0.04610106044"}]},{"label":"Other requests","instruction":"All other supported requests use native token pricing, including editing and streaming.","matches_example":false,"unit":"token","pricing_tiers":[{"input_field":"request","input_value":"other","is_default":false,"available":true,"unit":"token","price_per_unit":null,"list_price_per_unit":null,"pricing":[{"meter":"INPUT_TOKEN","unit":"token","price_per_unit":"0.000003575","list_price_per_unit":"0.000005"},{"meter":"OUTPUT_TOKEN","unit":"token","price_per_unit":"0","list_price_per_unit":"0"},{"meter":"IMAGE_OUTPUT_TOKEN","unit":"token","price_per_unit":"0.00002145","list_price_per_unit":"0.00003"}]}]}]}