AP
apimart-official/gpt-image-2
Launched 2025-09-25 · Operating for 338 daysWeChatAlipayCryptoPayPalCreemHOT
Capability
Text to ImageImage to Image
Weighted Discount
-20%
Price Rank #1 / 13
Billing Mode
Per Config
Quality × Resolution
Param Completeness
100%
API Doc Score 78/100
Excellent 11-language example coverage, clear param constraints, lacks interactive testing env
Pricing
| Quality \ Resolution | 1K | 2K | 4K |
|---|---|---|---|
| Low | $0.0048 $0.006 -20% | $0.0096 $0.012 -20% | $0.0128 $0.016 -20% |
| Medium | $0.0424 $0.053 -20% | $0.0856 $0.107 -20% | $0.1112 $0.139 -20% |
| High | $0.1688 $0.211 -20% | $0.3424 $0.428 -20% | $0.452 $0.565 -20% |
Price unit: USD, official price from OpenAI public pricing (USD)
API
API Style
Custom RESTDelivery
Async (Polling)
SDK
REST Only
Output
url
Integration
Base URL
https://api.apimart.aiEndpoint
POST
/v1/images/generationsAuth
bearer(Authorization)
Content-Type
application/jsonPolling
/v1/tasks/{task_id}Request Parameters
| Name | Type | Required | Default | Values |
|---|---|---|---|---|
| model | string | required | gpt-image-2-official | gpt-image-2-official |
| prompt | string | required | — | — |
| size | string | optional | 1:1 | auto1:13:22:34:33:4+10 |
| resolution | string | optional | 1k | 1k2k4k |
| quality | string | optional | auto | autolowmediumhigh |
| background | string | optional | auto | autoopaquetransparent |
| moderation | string | optional | auto | autolow |
| output_format | string | optional | png | pngjpegwebp |
| output_compression | integer | optional | — | — |
| n | integer | optional | 1 | — |
| image_urls | array | optional | — | — |
| mask_url | string | optional | — | — |
Operational
Timeout
Initial delay 10-20s, poll interval 3-5s, client timeout >=180s
Developer Experience
Code Examples
curlpythonjavascriptgojavaphprubyswiftcsharpdartr
extracted_from: api文档类型/补充apimart-official; 11语言示例; n 1-4; mask_url局部重绘; quality auto/low/medium/high; background auto/opaque/transparent(降级); output_format png/jpeg/webp; output_compression 0-100; 4K仅8比例; pixel串支持