# GPT Image 1 Mini (`openai/gpt-image-1-mini`): API > openai/gpt-image-1-mini is an image generation model from OpenAI you can call on the OceanToken API. Endpoint: `POST https://api.oceantoken.ai/v1/images/generations` (also `/v1/images/edits`). Auth: `Authorization: Bearer $OCEANTOKEN_API_KEY`. OpenAI-compatible; the OpenAI SDKs work with base URL https://api.oceantoken.ai/v1. ## Request parameters - `model` (string; required): This model's ID. - `prompt` (string; required): What to draw. - `size` (string; 1024x1024, 1536x1024, 1024x1536): Width x height. - `quality` (string; low, medium, high): Quality level; lower is faster and cheaper. - `n` (integer; 1 to 8; default 1): How many images. - `images` (array; up to 16 items): Up to 16 reference images to start from or draw on, each a public https:// URL or a data URL. The request is then an edit. ## Example: Basic ```bash curl https://api.oceantoken.ai/v1/images/generations \ -H "Authorization: Bearer $OCEANTOKEN_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "openai/gpt-image-1-mini", "prompt": "A lighthouse at dawn, watercolor", "size": "1024x1024" }' ``` ```python import os from openai import OpenAI client = OpenAI(base_url="https://api.oceantoken.ai/v1", api_key=os.environ["OCEANTOKEN_API_KEY"]) result = client.images.generate( model="openai/gpt-image-1-mini", prompt="A lighthouse at dawn, watercolor", size="1024x1024", ) print(result.data[0].url) # download within 24 hours ``` ## Response - `created` (integer): Unix time. - `data[].url` (string): The image. Download it within 24 hours. ```json { "created": 1792000000, "data": [ { "url": "https://..." } ] } ``` ## More - Model page: https://docs.oceantoken.ai/models/openai/gpt-image-1-mini - This spec as JSON (with a JSON Schema of the request): https://docs.oceantoken.ai/models/openai/gpt-image-1-mini/spec.json - Guide: https://docs.oceantoken.ai/guides/images - All models: https://docs.oceantoken.ai/llms.txt