Connect an agent

Models

Which model serves a request, how to pick a different one, what each costs, and which tools are pinned to a fixed model regardless of what you pass.

Selecting a model

Generation and editing take an optional model parameter. Omit it and the request goes to google/gemini-2.5-flash-image; pass a modelId from the catalogue to route somewhere else.

terminal
curl -X POST "https://api.imagemcpserver.com/playground/generate" \
  -H "Authorization: Bearer $IMAGEMCP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "prompt": "Isometric illustration of a data centre, flat colours",
  "model": "google/gemini-2.5-flash-image"
}'

Unknown models fall back rather than fail

If the model you pass is missing or is not an image model, the request is served by google/gemini-2.5-flash-image instead of erroring. Check result.model in the response to see what actually ran.

Reading the catalogue

list_models returns the models currently marked live, highest priority first. It costs nothing, so an agent can consult it before deciding how to spend.

Fields on each model

FieldTypeDescription
modelIdstringThe value to pass as model.
namestringHuman-readable name.
costPerReqnumberCredits a model-priced call deducts. Missing values bill 15 credits.
prioritynumberSort order in the catalogue; higher first.
isLivebooleanWhether the model is currently selectable.
outputsSupportedstring[]Output types — image models list image.

Tools with fixed models

Not everything is model-selectable. These tools run on models chosen for the specific job, so the model parameter is ignored and the price is flat:

  • remove_background and the cutout stage of generate_transparent_image — a dedicated background-removal model.
  • upscale_image — a dedicated crisp upscaler.
  • text_to_svg — a vector model, with an AI SVG fallback if the vector call fails.
  • compress_image and convert_format — no model at all; these are local image operations, which is why they cost 1 credit and return in well under a second.

Parameters that reach the model

Two request fields are worth being precise about, because one reaches the model and one does not:

  • aspectRatio is forwarded to the model as aspect_ratio. Common values are 1:1, 16:9, 9:16, 4:3, 3:4 and 21:9.
  • style is recorded on the request and echoed back in result.style, but it never reaches the model — style direction belongs in the prompt.

Put the style in the prompt

“Flat vector illustration, two-tone, thick outlines” in the prompt will change the output. Setting style: "vector" on its own will not.

Choosing well

  • Iterate on prompts with a cheaper model, then switch once the prompt is settled — the composition usually carries over.
  • Reach for text_to_svg rather than a raster model when the asset is an icon or a logo; you get editable markup instead of pixels.
  • Read result.latency if speed matters to your product; it is the real wall-clock time of that call.
  • Compare costPerReq before a large batch. On a hundred-image run the difference between models is the difference between a plan tier.

FAQ

What model is used if I do not specify one?

google/gemini-2.5-flash-image. The same fallback applies when the model you pass is not an image model.

How do I see the current list of models?

Call GET /playground/models — the list_models tool. It is free, and each entry carries the credit cost and priority the server uses.

Can I choose the model for background removal or upscaling?

No. Those tools are pinned to the dedicated models that do that job, which is also why their price is flat rather than model-dependent.