# OpenAI GPT Image 1 Mini — Text To Image > Try GPT-image-1-mini on GPT Proto. Generate new images from text prompts up to 1536x1024. Fast, affordable API for bulk creative applications. ## Overview - **Endpoint**: `POST https://gptproto.com/v1/images/generations` - **Query endpoint**: `POST https://gptproto.com/api/v3/predictions/{id}/result` - **Model ID**: `gpt-image-1-mini` - **Vendor**: OpenAI - **Scene**: `text-to-image` - **Category**: text-to-image - **Modalities**: input text → output image - **Model page**: https://gptproto.com/model/openai/gpt-image-1-mini - **API documentation**: https://docs.gptproto.com/docs/allapi/OpenAI/gpt-image-1-mini/official-format/text-to-image - **Other scenes of this model**: `image-edit` — 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 ## 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 The accepted JSON body is the official request shape below: **Full Example**: ```json { "model": "gpt-image-1-mini", "prompt": "a cat", "size": "1024x1024" } ``` ## Usage Examples ### 1. Submit a request ```bash curl --request POST "https://gptproto.com/v1/images/generations" \ --header "Authorization: Bearer $GPTPROTO_API_KEY" \ --header "Content-Type: application/json" \ --data '{ "model": "gpt-image-1-mini", "prompt": "a cat", "size": "1024x1024" }' ``` ```python import os import requests url = "https://gptproto.com/v1/images/generations" headers = { "Authorization": f"Bearer {os.environ['GPTPROTO_API_KEY']}", "Content-Type": "application/json" } payload = { "model": "gpt-image-1-mini", "prompt": "a cat", "size": "1024x1024" } response = requests.request("POST", url, headers=headers, json=payload) print(response.json()) ``` ```typescript const response = await fetch("https://gptproto.com/v1/images/generations", { method: "POST", headers: { "Authorization": `Bearer ${process.env.GPTPROTO_API_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ model: "gpt-image-1-mini", prompt: "a cat", size: "1024x1024", }), }); 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 - Simple, clean vector logo concept for a cozy neighborhood cafe. A stylized, hand-drawn coffee cup emitting steam that forms into a subtle heart shape. Warm brown and cream color palette. Flat design, white background. - A cat astronaut wearing a vintage diving helmet, floating in a sea of swirling coffee and cream nebula. Whimsical illustration. - A grand, panoramic view of an ancient Roman triumphal procession entering the city through a massive marble arch. Thousands of cheering citizens line the streets. Legions of soldiers march in perfect formation, followed by chariots and exotic animals. Bright sunny day, highly det… ## 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) - [API documentation](https://docs.gptproto.com/docs/allapi/OpenAI/gpt-image-1-mini/official-format/text-to-image) - [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`