Back to guides
Images·September 11, 2026·Updated October 10, 2026·7 min read

How to Use GPT-Image-2 — Through the API, Not ChatGPT, and the Cost per Image

Japanese-language information mainly covers steps in the ChatGPT interface or introductions to sites where you can try it for free. This page compiles the per-image API price and code that runs as-is.

GPT-Image-2 (gpt-image 2) is OpenAI's latest image generation model, and there are two ways to use it. You can describe what you want in the ChatGPT app (within your ChatGPT plan) or generate images through the API and pay per image. With the API, Kunavo charges $0.0633 per image. Just change the OpenAI SDK's base_url to https://api.kunavo.com/v1, specify gpt-image-2, and call POST /v1/images/generations. To edit an existing image, use gpt-image-2-edit with POST /v1/images/edits. ChatGPT usage and API billing are separate, and paid ChatGPT plans do not include API usage.

Japanese search results mostly explain how to use the ChatGPT interface or introduce external sites with free trials. This page goes further: it covers the cost per image when using the API, copy-and-run code, and the editing endpoint, and clearly explains when the ChatGPT app is a better fit.

Use ChatGPT or the API

ChatGPT appAPI
What you pay forChatGPT plan (monthly)Pay-as-you-go per image ($0.0633)
How it worksDescribe what you want in chat and refine it through conversationCall it from code. The same prompt and parameters produce reproducible results
Best forOccasionally create a few images and refine each one through iterationGenerate at scale, integrate into a service, and manage per-image costs
BillingChatGPT billingDeducted from your API key balance (separate from ChatGPT)

If you only create a few images occasionally, the ChatGPT app is simpler. You need no code or API key, and you can make refinements in conversation, such as asking it to “make it a little brighter.” Plan limits and terms often change on OpenAI's side, so we do not include figures here. The API is useful when you need to create dozens or hundreds of images in the same format, generate them inside your own service, or track the cost per image.

How to use ChatGPT (briefly)

Just describe the image you want in the ChatGPT chat box. Attach an image and ask “change the background” to edit it. The more specifically you describe the composition, lighting, intended use (such as a banner or product photo), and any text to include in the image, the closer the result will be to what you want. You can use the same prompting approach with the API.

How to use the API — 3 steps

  1. Create a key. After signing up, issue a key beginning with sk-kn- at /app/keys. It is displayed only once, so save it then.
  2. Top up your balance. Prepaid, starting at $10. Stripe Checkout supports cards including JCB, Apple Pay, Google Pay, and Link. Balances do not expire.
  3. Point the OpenAI SDK to Kunavo and make a call. You do not need an OpenAI account; for existing code, just replace base_url and the key.
gpt_image_2.py
import os
import requests
from openai import OpenAI

client = OpenAI(
    api_key=os.environ["KUNAVO_API_KEY"],   # sk-kn-...
    base_url="https://api.kunavo.com/v1",   # 既存コードから変えるのはここだけ
    timeout=600,                            # 同期モードは最長 540 秒待つ
)

img = client.images.generate(
    model="gpt-image-2",
    prompt="白い机の上の和菓子、やわらかい自然光、真上から、余白を多めに",
    size="1024x1024",                  # 縦横比として解釈される
    extra_body={"resolution": "2K"},   # 1K / 2K / 4K(SDK の標準外なので extra_body)
)

url = img.data[0].url   # files.kunavo.com の恒久的な URL。下の編集の例で使うので手元にも保存する
with open("wagashi.png", "wb") as f:
    f.write(requests.get(url, timeout=60).content)

The returned URL is a permanent files.kunavo.com URL and does not expire. GPT-Image-2 generation usually takes 15–60 seconds, and Kunavo holds the connection open for up to 540 seconds in synchronous mode. Set the client-side timeout to a longer value. For large batches, the asynchronous API is a better fit: submit with "async": true (or webhook_url), then retrieve the result using GET /v1/images/{id}. See the Image API documentation for details, and the Quickstart for instructions from creating a key through making your first call.

Key parameters

ParameterValueNotes
modelgpt-image-2For editing, use gpt-image-2-edit
promptStringRequired
sizeFor example, 1024x1024 in OpenAI formatInterpreted as an aspect ratio
resolution1K / 2K / 4KPass through extra_body in the SDK. If 4K is specified for a square image, it is automatically reduced to 2K and billed as 2K
qualitystandard / hdOnly for supported models
nIntegerMany models return one image regardless of n. To get multiple images, run calls in parallel

GPT-Image-2 pricing — how much does each API image cost?

The prices below are rendered directly from this site's model catalog, so the table updates when prices change.

Number of imagesPrice (Kunavo)
1 image$0.0633
100 images$6.33
1,000 images$63.30
With a $10 top-upAbout 157 images

At present, 1K, 2K, and 4K all cost the same: $0.0633 per image. Resolution-specific prices are displayed from the catalog in the resolution section of the documentation. Editing (GPT-Image-2 Edit) also costs $0.0633 per image. Failed requests are not billed, but regenerating an image because you do not like the result is a successful generation, so each image is billed.

OpenAI's direct API pricing is listed on OpenAI's pricing page. For a fair comparison, compare per-image costs at the same resolution and quality. ChatGPT plan fees are separate from both APIs.

Edit an image — gpt-image-2-edit

To create a variation of an existing image, use POST /v1/images/edits. Provide the source image as an HTTPS URL or a data: base64 URI in image. If there are multiple reference images, pass them as an array in image_urls. Editing uses a JSON request, so this example calls requests.

gpt_image_2_edit.py
import os
import base64
import requests

KEY = os.environ["KUNAVO_API_KEY"]

# 手元の画像を data: URI にする(https の URL をそのまま渡してもよい)
with open("wagashi.png", "rb") as f:
    src = "data:image/png;base64," + base64.b64encode(f.read()).decode()

r = requests.post(
    "https://api.kunavo.com/v1/images/edits",
    headers={"Authorization": f"Bearer {KEY}"},
    json={
        "model": "gpt-image-2-edit",
        "prompt": "背景を藍色の和紙に変える。和菓子と構図はそのまま",
        "image": src,   # 参照画像が複数なら "image_urls": [...] に配列で
    },
    timeout=600,
)
print(r.json()["data"][0]["url"])

If you reuse the same file often, upload it once with POST /v1/files to get a permanent URL from files.kunavo.com (up to 25 MB). After that, just pass the URL in image.

When Kunavo may not be the right fit

Kunavo's API lets you get started with a single key and no OpenAI account, but it runs on shared capacity. There is no dedicated allocation (quota) or contractual SLA. If you need a guaranteed quota or SLA at your scale, contracting directly with OpenAI is the right choice.

Also, if you only create a few images a month through conversation, the ChatGPT app takes less effort. If none of your reasons for choosing the API involve image volume, integration, or cost tracking, the app is enough.

Choosing between this and Nano Banana

You can also use other image models with the same key and endpoint by changing only the model string. If you need high volume and prioritize price, choose Nano Banana ($0.0273 per image); if you prioritize instruction following or text within images, choose GPT-Image-2. The quickest way to decide is to generate ten images with each model using the same prompt and compare the results.

For detailed guides in English, see the GPT-Image-2 API guide and Nano Banana API. For text GPT model rates, see GPT API pricing; for video generation, see How to use the Seedance API; and for rates across all models, see the pricing page.

Frequently asked questions

What is GPT-Image-2 (gpt-image 2)?

OpenAI's latest image generation model. It is available in the ChatGPT app and through the API. For API use, call the OpenAI-compatible images endpoint (POST /v1/images/generations) and specify gpt-image-2 as the model. To edit an existing image, use gpt-image-2-edit (POST /v1/images/edits).

How much does the GPT-Image-2 API cost?

Through Kunavo's API, each image costs $0.0633. At present, 1K, 2K, and 4K resolutions all cost the same. Editing (gpt-image-2-edit) also costs $0.0633 per image. There is no monthly fee; the cost of each image is deducted from your prepaid balance. 100 images cost $6.33, and 1,000 cost $63.30. Failed requests are not billed.

Can I use the GPT-Image-2 API if I have ChatGPT Plus?

No. ChatGPT plans and the API are separate products with separate billing, and paid ChatGPT plans do not include API usage. To use the API, you need an API key and a separate balance associated with that key. Conversely, adding funds to your API balance does not increase your ChatGPT usage allowance.

How do I use GPT-Image-2 through the API?

Create an API key, point the OpenAI SDK's base_url to https://api.kunavo.com/v1 and then call images.generate with gpt-image-2 as the model. You do not need an OpenAI account. Resolution (1K / 2K / 4K) is not a standard SDK parameter, so pass it through extra_body. The returned image URL is a permanent files.kunavo.com URL and does not expire.

Can GPT-Image-2 edit existing images?

Yes. Send the prompt and source image to POST /v1/images/edits with gpt-image-2-edit as the model. Set image to the source image's HTTPS URL or data: base64 URI. If there are multiple reference images, pass them as an array in image_urls. Pricing is per image, just like generation.

Can GPT-Image-2 create 4K images?

Set resolution to 4K to create a 4K image. However, GPT-Image-2 cannot output a square (1:1) image at 4K. If you specify 4K for a square image, it is automatically generated at 2K and billed as 2K. If you need 4K, use size to specify a landscape or portrait aspect ratio.

Can I generate multiple images at once?

There is an n parameter, but many image models return only one image regardless of its value. To generate multiple images, run calls in parallel or use the asynchronous API (set async to true, then retrieve the results later). You are billed for each image generated.

Should I use the ChatGPT app or the API?

If you create just a few images a month and refine them through conversation, the ChatGPT app is simpler and requires no code or API key. The API is a better fit if you need to generate many images in the same format, integrate image generation into a service or workflow, or manage per-image costs. The API has no monthly fee, and months with no generations cost $0.