Home / Servers / OpenAI API / create_image

Create image

An MCP tool from the OpenAI API server, hosted on mcp.hjlabs.in.

Create image Creates an image given a prompt using a GPT Image model. Learn more. [POST /images/generations]

Name on the gateway: openai_api__create_image · may change things.

Parameters

NameTypeDescription
frame_countintegerNumber of frames for GIF output. Accepts integers from 2 through 16. Defaults…
frame_duration_msintegerRequested delay per GIF frame, in milliseconds. Defaults to 200 when omitted.…
complexitystringComputation spent planning the image, independently of rendering quality. Uses…
svgobjectSelects the model and reasoning effort used to author SVG output. Requires…
prompt requiredstringA text description of the desired image(s). The maximum length is 32000…
model requiredstringThe GPT image model to use for image generation. Specify a model explicitly.…
nintegerThe number of images to generate. Must be between 1 and 10.
qualitylow | medium | high | xhigh | max | auto | standard | hdThe quality of the image that will be generated. - auto (default value) will…
response_formatstringLegacy response format parameter for retired image models. Unsupported for GPT…
output_formatpng | jpeg | webp | gif | svgThe format in which the generated images are returned. This parameter is only…
output_compressionintegerThe compression level (0-100%) for the generated images. This parameter is…
streambooleanGenerate the image in streaming mode. Defaults to false. See the Image…
partial_imagesintegerThe number of partial images to generate. This parameter is used for streaming…
sizestringThe size of the generated images. For gpt-image-2, gpt-image-2-2026-04-21…
moderationlow | autoControl the content-moderation level for images generated by the GPT image…
backgroundtransparent | opaque | autoSet the background of the generated image(s). This parameter is only supported…
stylestringLegacy style parameter for retired image models. Unsupported for GPT image…
safety_identifierstringA stable identifier for an end user in your organization, used for safety…
userstringDeprecated: use safety_identifier instead. This parameter remains accepted for…

How to call it

Through the Smart Gateway, any client can run it by name with call_tool, or let the gateway find it with search_tools:

call_tool arguments
{
  "name": "openai_api__create_image",
  "arguments": {
    "prompt": "…",
    "model": "…"
  }
}

Or connect the OpenAI API server directly, which lists 371 tools including this one:

Run in your terminal
claude mcp add --transport http hj-openai-api https://mcp.hjlabs.in/mcp/openai-api \
  --header "Authorization: Bearer YOUR_API_KEY"

Try asking

Use the create image tool with frame_count set to ….

More from OpenAI API