Skip to main content
Glama

generate

Generate AI media by running a job with params from get_model_params. Enforces spend guardrails and accepts URLs for media inputs.

Instructions

Run a media generation job on Pixio, with spend guardrails.

This is the final step of the 3-call discovery contract: list_models -> get_model_params -> generate. Build params from the live get_model_params(model_id) response — this server embeds no model schemas. On a first attempt send EVERY param the schema lists, at its default value (some params marked optional are actually required by the gateway), and send select-option values as STRINGS (e.g. "5", not 5).

URLs-only contract: every media input inside params must be an http(s) or data: URL. Any value that looks like a local filesystem path (~, ./, ../, file://, X:\, UNC \\, or an existing file) is rejected with a VALIDATION error naming the offending field(s) — before any credits are spent. Call upload_media first and pass the permanent URL it returns.

Spend guardrails: the job cost is estimated up front and refused with BUDGET_EXCEEDED if it exceeds the per-job cap or would exceed the session budget — no credits are spent on a refusal. Pass confirm=true to explicitly override both caps for this one job.

Waiting: with wait=true (default) this call polls until the job is terminal or timeout_s elapses (default: PIXIO_DEFAULT_TIMEOUT_S, 180s). On timeout you get a TIMEOUT_PENDING error whose details carry the generation_id — the job KEEPS RUNNING server-side; resume with wait_for_generation(generation_id). With wait=false the call returns immediately (status "processing", plus estimated_credits); check later with get_generation or wait_for_generation.

Output URLs may be signed and expire after roughly an hour — call download_output(generation_id) promptly.

Args: model_id: Pixio model id, e.g. "pixio/flux-1/schnell". params: Generation inputs built from get_model_params (URLs only for media fields). wait: Poll to completion (True, default) or return immediately. timeout_s: Max seconds to wait when wait=true; None uses the server default. confirm: Set True to override the per-job and session credit caps.

Returns: On success: {"generation_id", "status", "output_urls", "outputs", "model_id", "credits_spent", "remaining_balance", "elapsed_s", "error"}. With wait=false: the same shape with status "processing", credits_spent None, and estimated_credits added. On failure: {"error": {"code", "message", "details"}} with code VALIDATION, BUDGET_EXCEEDED, INSUFFICIENT_CREDITS, CONCURRENCY, GENERATION_FAILED, TIMEOUT_PENDING, NOT_FOUND, AUTH, or UPSTREAM_ERROR. NOTE: success results also contain an "error" key (the provider reason, null on success) — a call failed only when result["error"] is a dict carrying a "code".

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
waitNo
paramsYes
confirmNo
model_idYes
timeout_sNo
Behavior5/5

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

Despite no annotations, the description thoroughly discloses behavioral traits: spend guardrails (BUDGET_EXCEEDED), URL-only input requirement, validation errors, waiting/polling mechanisms, timeout handling, output URL expiration, and error codes. No contradictions with annotations since none exist.

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?

The description is well-structured with a summary, step-by-step instructions, parameter details, and return format. While it's fairly long, every sentence adds value given the tool's complexity. A slight reduction could improve conciseness, but it remains efficient.

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

Completeness5/5

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

Given the tool's complexity (5 parameters, nested objects, no output schema), the description is remarkably complete. It explains return values for success and failure, all possible error codes, and the behavior of wait=true/false, leaving no major gaps.

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

Parameters5/5

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

Schema description coverage is 0%, but the description compensates fully with an 'Args:' section explaining each parameter's purpose, defaults, and constraints. For 'params', it provides critical context about building from get_model_params and URL-only media fields, which the schema lacks.

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

Purpose5/5

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

The description clearly states that the tool runs a media generation job on Pixio with spend guardrails. It distinguishes itself from siblings by being the final step of a 3-call discovery contract (list_models -> get_model_params -> generate), making its purpose very specific.

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

Usage Guidelines5/5

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

The description explicitly explains when to use the tool (as the final step of the discovery contract) and provides alternatives for waiting behavior (e.g., using wait_for_generation if timeout occurs). It also gives detailed instructions on how to build params from get_model_params and URL requirements.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/RealDealCPA-VR/Pixio-MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server