ToAPIs
    homeToAPIs
    ModelsModel PricingAPI Docs
    LoginStart for Free

    Quick Answer

    • Use POST /v1/images/generations with model=gpt-image-2.
    • Supports prompt generation and reference_images URL inputs for guided generation.
    • Reference images must be URLs, so local files must be uploaded first instead of passing base64 directly.
    • The endpoint returns an async task id for later status polling.
    • Official public pricing is roughly $0.22 / $0.50 / $1.30 per image for 1K / 2K / 4K; ToAPIs currently shows $0.015 / $0.020 / $0.025 per image on the landing comparison, with final billing based on account pricing.
    • At the ToAPIs 1K listed rate of $0.015 per image, a $10 top-up is roughly 600+ additional 1K images; at the 4K listed rate of $0.025 per image, it is roughly 400 4K images.

    Key Parameters

    • model | string | required | gpt-image-2 | - | Use gpt-image-2 as the exact model id.
    • prompt | string | required | - | - | Primary prompt for image generation or editing.
    • size | string | optional | 1:1 | 1K: 1:1 | 3:2 | 2:3; 2K: 1:1 | 3:2 | 2:3 | 4:3 | 3:4 | 5:4 | 4:5 | 16:9 | 9:16 | 2:1 | 1:2 | 21:9 | 9:21; 4K: 4:3 | 3:4 | 16:9 | 9:16 | 2:1 | 1:2 | 21:9 | 9:21 | Output aspect ratio; supported values depend on the selected resolution tier.
    • resolution | string | optional | 1K | 1K | 2K | 4K | Output resolution tier; must match a supported size combination.
    • reference_images | string[] | optional | - | URL array | Reference image URL array. Local files must be uploaded first; no direct base64 references.
    • image_urls | string[] | optional | - | URL array (compat field) | Compatibility field; prefer reference_images for new integrations.
    • response_format | string | optional | url | url | b64_json | Response format; current ToAPIs docs recommend url.

    Common Errors

    • 400 invalid_request_error: trigger=Missing required fields or invalid size-resolution combinations.; fix=Validate model, prompt, size, resolution, and response_format against docs.; retry=Retry only after correcting the payload.
    • 400 invalid_reference_images: trigger=Passing base64, local paths, or non-URL reference_images values.; fix=Upload the image first and pass the resulting URL in reference_images.; retry=Retry after fixing the reference image input.
    • 401 authentication_error: trigger=Missing Authorization header or invalid API key.; fix=Verify bearer token format and key scope.; retry=Retry after fixing authentication.
    • 429 rate_limit_exceeded: trigger=Request rate, concurrency, or current quota hits upstream rate limiting.; fix=Apply exponential backoff first, then review request rate, concurrency, and quota usage.; retry=Use 1s/2s/4s backoff with jitter; if it persists, reduce submission pressure.
    OpenAI logo

    GPT-Image-2

    Commercial use

    Generate stunning, high-quality images with OpenAI's latest image model through one ToAPIs account.

    Model Type:
    Pricing: 1K $0.015 / image; 2K $0.02 / image; 4K $0.025 / image
    PlaygroundExamplesSimilarREADMEAPI
    1

    Describe your image

    Reference images

    Describe the image you want to generate.149 / 1200

    Advanced options

    Example params
    2

    Your generated result

    Example result
    View API DocsGet API Key

    Generation takes some time. Please wait.You can leave this page. [ Task Logs ] lets you check the generated content directly.

    Request preview

    {
      "model": "gpt-image-2",
      "prompt": "Create a premium fashion campaign image: a model wearing a structured ivory jacket, soft studio lighting, crisp fabric detail, editorial composition.",
      "size": "4:5",
      "n": 1,
      "response_format": "b64_json",
      "metadata": {
        "resolution": "1K",
        "orientation": "portrait"
      }
    }

    2M+

    Images generated

    8s

    Avg. response time

    99.9%

    Uptime

    API

    Ready for production

    Generated examples

    Explore what GPT-Image-2 can create

    Create with this model
    GPT-Image-2 generated fashion campaign visual

    Generated in 8.2s with GPT-Image-2

    GPT-Image-2 generated product scene

    GPT-Image-2 #2

    GPT-Image-2 generated social creative

    GPT-Image-2 #3

    Transparent pricing

    ToAPIs vs Official GPT-Image-2 Pricing

    Same image model capability, lower generation cost, free credits on signup.

    Top up credits

    1K

    ToAPIs

    $0.015

    image

    Save 93%VS

    Official Price

    $0.22

    image

    2K

    ToAPIs

    $0.02

    image

    Save 96%VS

    Official Price

    $0.5

    image

    4K

    ToAPIs

    $0.025

    image

    Save 98%VS

    Official Price

    $1.3

    image

    SpecificationToAPIs priceSavingsOfficial Price
    1K

    ToAPIs

    $0.015

    image

    Save 93%VS

    Official Price

    $0.22

    image

    2K

    ToAPIs

    $0.02

    image

    Save 96%VS

    Official Price

    $0.5

    image

    4K

    ToAPIs

    $0.025

    image

    Save 98%VS

    Official Price

    $1.3

    image

    Prices are shown for model-page comparison and may change. Final billing follows the current account pricing.

    Why ToAPIs

    Why use ToAPIs for GPT-Image-2?

    Keep GPT-Image-2 quality while lowering image generation costs and using one API key across more models.

    Lower per-image pricing

    Generate 1K, 2K, and 4K images at a lower listed cost than official pricing.

    Free credits first

    New users get 10 credits to test prompts before topping up.

    Unified API access

    Use one ToAPIs account and API key across image, video, and language models.

    Start generating in three steps

    Test in the page, then move the same model into your production workflow.

    1. 1

      Try a prompt

      Use the playground to validate quality, text rendering, and style fit.

    2. 2

      Create an API key

      Sign up, open Dashboard, and create a token for GPT-Image-2 requests.

    3. 3

      Ship your workflow

      Call the image endpoint, poll async task status, and top up credits as usage grows.

    Built for image generation teams

    Ads and social creatives

    Produce campaign concepts, thumbnails, posters, and localized image variants.

    Product visuals

    Generate product-style shots, merchandising scenes, and reference-guided variations.

    Developer pipelines

    Add async image generation to agents, CMS tools, and batch creative systems.

    FAQ

    GPT-Image-2 pricing FAQ

    Can I try GPT-Image-2 for free?

    Yes. New ToAPIs users receive 10 credits and can test GPT-Image-2 before topping up.

    Is the official comparison fixed?

    This model page uses a fixed comparison table for clarity. Final ToAPIs billing follows current account pricing.

    Can I use the API after testing?

    Yes. Create an API key in the dashboard and integrate GPT-Image-2 into your image generation workflow.

    GPT-Image-2 API

    Generate your first GPT-Image-2 image on ToAPIs

    Start with free credits, compare the output, then get an API key when you are ready to scale.

    Start for freeView API Docs

    New here? Sign up and get 10 free credits to try GPT-Image-2 now!

    Explore the power of AI image generation with zero risk.

    Sign up to get free credits
    ToAPIs
    homeToAPIs

    Enterprise AI API gateway: text, image, video, and audio models behind one interface.

    运营主体:
    鯨樞智能科技有限公司
    JINGSHU INTELLIGENT LIMITED
    注册地址:
    ROOM 5042, 5/F, YAU LEE CENTRE, NO.45, HOI YUEN ROAD, KWUN TONG, KOWLOON, HONG KONG
    联系方式:
    support@toapis.com

    Models

    • Sora 2 API
    • Veo 3.1 API
    • GPT Image 2 API
    • All models

    Alternatives

    • Fal.ai alternative
    • Wavespeed AI alternative
    • PiAPI alternative
    • CometAPI alternative
    • Replicate alternative
    • AIMLAPI alternative

    Resources

    • Docs
    • Service status
    • Pricing
    • Privacy
    • Terms
    • Acceptable Use
    • Data Deletion
    • Data Retention
    • Subprocessors & Regions
    • Billing & Refunds
    • Cookie Policy
    • Sitemap
    • About

    © 2026 ToAPIs. All rights reserved.