Skip to main content
Glama

Create image

create_image

Generate images from text prompts or reference images for design, marketing, and creative workflows. Supports image-to-image edits, masks, and model-specific options.

Instructions

Creates an image given a prompt.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nNoNumber of images to generate
seedNoSeed for deterministic-compatible image models.
sizeNoImage size. Defaults are model-specific. For gpt-image-2, omit this field or use auto for automatic…
userNoEnd-user identifier
asyncNoReturn a task before the final image is ready when the selected model supports public async executi…
modelYesModel to use. Send this explicitly; query GET /v1/models?recommended_for=image for current recommen…
styleNoOptional model-specific style selector. Only send when the selected model documents support for thi…
promptYesImage description
qualityNoImage quality. Defaults and accepted values are model-specific. For gpt-image-2, omit this field or…
mask_urlNoOptional mask URL for compatible image operations.
image_urlNoSingle reference image URL for compatible image-to-image models.
operationNoPublic image operation family. Reference-image models use image-to-image with image_url, image_urls…
backgroundNoBackground handling for compatible image flows. For gpt-image-2 generation and edits, accepted valu…
image_urlsNoReference image URLs for compatible image-to-image models.
moderationNoModeration strictness for compatible image models such as gpt-image-2
resolutionNoResolution selector for compatible image model families.
compressionNoAlias for output_compression when supported by the selected model
aspect_ratioNoAspect-ratio selector for compatible image model families.
expand_promptNoAsk compatible models to expand or enhance the prompt.
output_formatNoOutput image format for compatible image models such as gpt-image-2
prompt_extendNoFor z-image-turbo, enable prompt expansion. Defaults to false. Enabling it uses the model's prompt-…
negative_promptNoContent to avoid for compatible image models.
response_formatNoResponse formaturl
output_compressionNoOutput compression level from 0 to 100 for compressed formats
reference_image_urlsNoAlias used by compatible reference-image model families.
X-TokenLab-Delivery-PolicyNoPer-request Delivery policy. Overrides the API key and Workspace defaults. Auto tries TokenLab Veri…

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.6.26
    • addedInput schema / properties / prompt_extend
      Added value: +{
      +  "description": "For z-image-turbo, enable prompt expansion. Defaults to false. Enabling it uses the model's prompt-…",
      +  "type": "boolean"
      +}
  2. Changed8 schema fields changedv0.6.24
    • addedInput schema / properties / X-TokenLab-Delivery-Policy
      Added value: +{
      +  "description": "Per-request Delivery policy. Overrides the API key and Workspace defaults. Auto tries TokenLab Veri…",
      +  "enum": [
      +    "auto",
      +    "verified",
      +    "official"
      +  ],
      +  "type": "string"
      +}
    • changedInput schema / properties / async / description
      Previous value: -"Return a task before the final image is ready when the selected model supports public async execution."New value: +"Return a task before the final image is ready when the selected model supports public async executi…"
    • changedInput schema / properties / background / description
      Previous value: -"Background handling for compatible image flows. For gpt-image-2 generation and edits, accepted values are auto and opaque; transparent is not supported. Other models may support different values."New value: +"Background handling for compatible image flows. For gpt-image-2 generation and edits, accepted valu…"
    • changedInput schema / properties / model / description
      Previous value: -"Model to use. Send this explicitly; query GET /v1/models?recommended_for=image for current recommendations."New value: +"Model to use. Send this explicitly; query GET /v1/models?recommended_for=image for current recommen…"
    • changedInput schema / properties / operation / description
      Previous value: -"Public image operation family. Reference-image models use image-to-image with image_url, image_urls, or reference_image_urls."New value: +"Public image operation family. Reference-image models use image-to-image with image_url, image_urls…"
    • changedInput schema / properties / quality / description
      Previous value: -"Image quality. Defaults and accepted values are model-specific. For gpt-image-2, omit this field or use auto for automatic quality, or send low, medium, or high. Other image families may use provider-specific values."New value: +"Image quality. Defaults and accepted values are model-specific. For gpt-image-2, omit this field or…"
    • changedInput schema / properties / size / description
      Previous value: -"Image size. Defaults are model-specific. For gpt-image-2, omit this field or use auto for automatic sizing, or send WIDTHxHEIGHT; custom dimensions must both be multiples of 16, longest edge <= 3840px, long/short ratio <= 3:1, and total pixels between 655,360 and 8,294,400."New value: +"Image size. Defaults are model-specific. For gpt-image-2, omit this field or use auto for automatic…"
    • changedInput schema / properties / style / description
      Previous value: -"Optional model-specific style selector. Only send when the selected model documents support for this parameter."New value: +"Optional model-specific style selector. Only send when the selected model documents support for thi…"
  3. Changed6 schema fields changedv0.6.4
    • removedInput schema / $schema
      Removed value: -"http://json-schema.org/draft-07/schema#"
    • changedInput schema / properties / background / description
      Previous value: -"Background handling for compatible image generation flows such as gpt-image-2 text-to-image. Not supported for gpt-image-2 image edits."New value: +"Background handling for compatible image flows. For gpt-image-2 generation and edits, accepted values are auto and opaque; transparent is not supported. Other models may support different values."
    • removedInput schema / properties / seed / maximum
      Removed value: -9007199254740991
    • removedInput schema / properties / seed / minimum
      Removed value: --9007199254740991
    • removedInput schema / properties / stream
      Removed value: -{
      -  "const": false,
      -  "description": "Image streaming is not exposed through MCP tool calls; omit stream or set it to false.",
      -  "type": "boolean"
      -}
    • changedInput schema / required
      Previous value: -[
      -  "prompt",
      -  "model"
      -]New value: +[
      +  "model",
      +  "prompt"
      +]
  4. Changed5 schema fields changedv0.6.3
    • removedInput schema / properties / quality / default
      Removed value: -"standard"
    • changedInput schema / properties / quality / description
      Previous value: -"Image quality. GPT Image models such as gpt-image-2 use auto/low/medium/high. Other image families may use provider-specific values."New value: +"Image quality. Defaults and accepted values are model-specific. For gpt-image-2, omit this field or use auto for automatic quality, or send low, medium, or high. Other image families may use provider-specific values."
    • removedInput schema / properties / quality / enum
      Removed value: -[
      -  "standard",
      -  "hd",
      -  "auto",
      -  "low",
      -  "medium",
      -  "high"
      -]
    • removedInput schema / properties / size / default
      Removed value: -"1024x1024"
    • changedInput schema / properties / size / description
      Previous value: -"Image size. For gpt-image-2, use auto or WIDTHxHEIGHT; custom dimensions must both be multiples of 16, longest edge <= 3840px, long/short ratio <= 3:1, and total pixels between 655,360 and 8,294,400."New value: +"Image size. Defaults are model-specific. For gpt-image-2, omit this field or use auto for automatic sizing, or send WIDTHxHEIGHT; custom dimensions must both be multiples of 16, longest edge <= 3840px, long/short ratio <= 3:1, and total pixels between 655,360 and 8,294,400."
  5. Addedv0.3.1

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare the safety profile (readOnly=false, destructive=false, idempotent=false, openWorld=true), so the description's only job is added context, and it adds none. It omits model-dependent behavior, that output is non-deterministic per call, and that the 26 parameters are largely model-specific and may be ignored or rejected depending on the selected model.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

It is a single front-loaded sentence with zero filler, which is efficient. It is arguably under-sized for a 26-parameter tool, but that gap is captured under contextual completeness rather than waste.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with 26 parameters, three operation families (text-to-image, image-to-image, image-edit), seven enums, and model-specific options, one sentence is far from sufficient. It omits required-vs-optional expectations beyond model/prompt, the need to consult the recommended-models endpoint, and how this differs from sibling generation/editing tools; with no output schema the description should also hint at the url/b64_json response shape.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so every parameter including model, prompt, operation, and the model-specific fields is already documented in the schema; the baseline of 3 applies. The description adds no additional meaning about how model selection gates the other 24 parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource ('Creates an image') plus the required input ('given a prompt'), which is clear enough to know the general operation. However, it provides no differentiation from close siblings such as edit_image, edit_image_file, and create_image_file, leaving the agent to infer routing.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no when-to-use guidance, no exclusions, and no mention of alternatives. Given the crowded sibling set (edit_image, create_image_file, edit_image_file), the agent gets no help deciding between generation and editing or between this and file-based variants.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.