# OpenAI GPT Image 1 Mini — Image Edit > Integrate the ai gpt image 1 mini model for high-speed visual reasoning and OCR. Access OpenAI's cost-efficient vision API via GPTProto.com for low latency. ## Overview - **Endpoint**: `GET https://gptproto.com/v1/images/edits` - **Query endpoint**: `POST https://gptproto.com/api/v3/predictions/{id}/result` - **Model ID**: `gpt-image-1-mini` - **Vendor**: OpenAI - **Scene**: `image-edit` - **Category**: image-to-image - **Modalities**: input image → output image - **Model page**: https://gptproto.com/model/openai/gpt-image-1-mini/image-edit - **API documentation**: https://docs.gptproto.com/docs/allapi/OpenAI/gpt-image-1-mini/official-format/image-edit - **Other scenes of this model**: `text-to-image` — same auth, different endpoint path and input schema ## Authentication Every request needs a GPTProto API key. Create one at https://gptproto.com/dashboard/api-key, then export it: ```bash export GPTPROTO_API_KEY="your-api-key" ``` Header: `Authorization: Bearer $GPTPROTO_API_KEY`. ## Pricing Platform price by tier (USD, already includes the GPTProto discount): - **Image Output** — $0.0056 per 1K tokens - **Image Input** — $0.0017 per 1K tokens - **Cached Input** — $0.0002 per 1K tokens - **Text Input** — $0.0014 per 1K tokens Price range: $0 – $0 per generation. Prices may change. The model page always shows the live price: https://gptproto.com/model/openai/gpt-image-1-mini/image-edit ## API Information The examples below use this model's official request format. Submit the first request, then poll the query endpoint until the vendor operation finishes. ### Input Schema See the cURL example below for the accepted request body. ## Usage Examples ### 1. Submit a request ```bash curl --request GET "https://gptproto.com/v1/images/edits" \ --header "Authorization: Bearer $GPTPROTO_API_KEY" ``` ```python import os import requests url = "https://gptproto.com/v1/images/edits" headers = { "Authorization": f"Bearer {os.environ['GPTPROTO_API_KEY']}" } response = requests.request("GET", url, headers=headers) print(response.json()) ``` ```typescript const response = await fetch("https://gptproto.com/v1/images/edits", { method: "GET", headers: { "Authorization": `Bearer ${process.env.GPTPROTO_API_KEY}`, }, }); const data = await response.json(); console.log(data); ``` ### 2. Check status Replace `{{operation_id}}` (or the operation name in the URL) with the value returned by the submit request, and keep polling until the operation completes. ```bash curl --request POST "https://gptproto.com/api/v3/predictions/{id}/result" \ --header "Authorization: Bearer $GPTPROTO_API_KEY" \ --header "Content-Type: application/json" ``` ```python import os import requests url = "https://gptproto.com/api/v3/predictions/{id}/result" headers = { "Authorization": f"Bearer {os.environ['GPTPROTO_API_KEY']}", "Content-Type": "application/json" } response = requests.request("POST", url, headers=headers) print(response.json()) ``` ```typescript const response = await fetch("https://gptproto.com/api/v3/predictions/{id}/result", { method: "POST", headers: { "Authorization": `Bearer ${process.env.GPTPROTO_API_KEY}`, "Content-Type": "application/json", }, }); const data = await response.json(); console.log(data); ``` ## Example Prompts - Change the background to grass. - Replace the phone in the picture with headphones. - Dress the model in the clothes and hat. Add a cat to the scene and change the background to a Victorian era building. ## HTTP Status Codes - `400` — malformed body, a parameter or value this model does not accept, or input blocked by the provider's content moderation - `401` — missing or invalid API key - `403` — insufficient credits - `413` — request body too large - `429` — rate limited; retry with backoff - `500` — An internal server error occurred - `502` — An internal server error occurred - `504` — Gateway timeout — upstream service did not respond in time; retry later ## Additional Resources - [Model page](https://gptproto.com/model/openai/gpt-image-1-mini/image-edit) - [API documentation](https://docs.gptproto.com/docs/allapi/OpenAI/gpt-image-1-mini/official-format/image-edit) - [All models](https://gptproto.com/model) - [API keys](https://gptproto.com/dashboard/api-key) - [Platform overview for LLMs](https://gptproto.com/llm-full.txt) - Any other model: `https://gptproto.com/model/{vendor}/{model}/{scene}/llms.txt`