Skip to main content
Public task model schemas include a top-level mcp object. It describes how a client binds uploaded files and reads task results. It does not change request authentication, API endpoints, Studio sessions, billing, or backend parameter validation.

Contract version 1.0

Default models and creation tools

The public model index declares shortcut defaults separately from model parameter schemas:
Each value must be an exact canonical task model ID in that index. These are the current configured choices, not plugin constants. list_models.defaults returns {tool, model} references; the same model may serve several tools. Changing a default takes effect after the index cache refreshes. Missing bindings or unavailable documentation never trigger a built-in fallback or automatic model switch. All seven creation tools use the same arguments: input, optional reference_files/file_bindings, and Studio session references. generate_task requires model; the six shortcuts may omit it to use the index default, or specify another task model. Read that model’s complete schema before constructing input. The tool name chooses the default and keeps its own authorization/rate-limit identity; it does not inject a mode or rewrite model fields. Use the mode for the requested operation from the selected schema, including speech, cloning or design.
This is an example generate_image call. Model parameters such as prompt, mode, voice, voice_id, and customMode go inside input, using the selected schema’s original names and values. Legacy flat arguments, reference_images, and reference_audio are not accepted. No model defaults, inferred languages, preset voices or field aliases are added. Model semantics are validated by the backend; transport, credentials, sessions, attachment safety and bounded result parsing remain enforced by the client.

Attachment paths

Each binding declares a parameter path, media hint (image, video, audio, mixed, or file), and URL shape (string or string[]). The field must exist in the input schema; nested paths must start at an object or object array. Paths use named object keys and [] for array items, with at most 16 segments. No executable expressions, arbitrary object traversal, transport fields or prototype keys are supported. For elements[].image_urls, send input.elements=[{"name":"hero"}] and file_bindings=[{"field":"elements[0].image_urls","file_indices":[1,0]}]. The named item must already exist. Only the missing URL leaf is filled; names, timestamps and other metadata stay unchanged. Each file is used once, explicit order is preserved, and existing URL values cannot be overwritten. Direct media URLs and file bindings are separate input methods and are not mixed within one call. The client checks attachment URL safety without downloading media. The backend validates media content and model-specific limits.

Result formats

These versioned names identify formats, not model eligibility lists. Any model can declare the matching format after its observable results are verified. Decoders enforce bounded output and URL safety; unknown raw fields never become user-facing results. A new output shape needs a decoder, not an arbitrary extraction expression in schema. For cosyvoice_v1, also declare mode_media_types, mapping documented lowercase mode values to speech or voice, for example {"speech":"speech","clone":"voice","design":"voice"}. Clients match trimmed, case-insensitive mode spellings for the creation result hint without rewriting input. Carry that hint when polling; task IDs and file extensions do not identify the operation. Voice lifecycle fields remain authoritative, and a voice ID is reusable only after successful readiness.

Adding or updating a model

  1. Implement and verify the backend’s public request and result behavior.
  2. Add the schema, its paired model page, and the public index entry.
  3. Declare the result format and every attachment path; use attachments: [] when there are none.
  4. Run the schema checks and client contract tests. The generator preserves the manual mcp object.
  5. Publish through the normal release process. Clients read the public schema after their cache refreshes.
Missing, malformed, or unsupported declarations do not hide the schema. Clients show the complete document. Task creation requires valid attachment and result declarations; querying an existing task only requires a valid result declaration. An invalid attachment declaration does not disable result decoding. All task creation and queries load the selected schema, including default shortcuts. Schema declarations cannot override credentials, request URLs, session references, or security checks. LLM gateway schemas use their own API protocols and do not declare this task contract.