Skip to main content

Submit Generation Async

Immutable Catalog Entry

This descriptor comes from the active versioned Portal catalog.

WRITEleonardo-ai.leonardo_submit_generation_async
  • Contract tier: agent_ready
  • Risk: write
  • Catalog version: leonardo-ai-2026.07.12.1
  • Descriptor hash: 4386a5375c4926eb5849c9d0877195d60224577cdf062656ac09f38a9ba1eee3

Submit a Leonardo job, store its ID locally, and rely on webhook completion. Requires the request-scoped x-leonardo-api-key Portal field and contacts Leonardo.Ai.

Request Body

{
"jsonrpc": "2.0",
"id": "leonardo-ai-leonardo-submit-generation-async-example",
"method": "tools/call",
"params": {
"name": "leonardo-ai.leonardo_submit_generation_async",
"arguments": {
"body": "",
"mode": "v2_media",
"request_body": ""
}
}
}

Arguments Schema

{
"type": "object",
"properties": {
"body": {
"anyOf": [
{
"type": "object",
"additionalProperties": true
},
{
"type": "null"
}
],
"default": null,
"description": "Leonardo request body using provider parameter names exactly. For v1 image generation use fields such as prompt, modelId, width, height, num_images, alchemy, ultra, public, imagePrompts, init_image_id, or isInitImage. For v2 generation use model, public, and parameters."
},
"mode": {
"enum": [
"v2_media",
"v1_image",
"image_to_video",
"text_to_video",
"svd_motion",
"video_upscale"
],
"type": "string",
"default": "v2_media",
"description": "Leonardo async generation endpoint family to submit."
},
"request_body": {
"anyOf": [
{
"type": "object",
"additionalProperties": true
},
{
"type": "null"
}
],
"default": null,
"description": "Alias for body. Use when an agent has a planned request_body from a planning tool."
}
},
"additionalProperties": false
}

Output Schema

{
"type": "object",
"description": "Leonardo MCP result. ok=false, provider_ok=false, a failed status, or an error field represents a semantic failure even when transport delivery succeeded.",
"additionalProperties": true
}

Code Examples

curl -X POST 'https://portal.madpanda3d.com/api/mcp' \
-H 'Authorization: Bearer mad_live_***' \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": "leonardo-ai-leonardo-submit-generation-async-example",
"method": "tools/call",
"params": {
"name": "leonardo-ai.leonardo_submit_generation_async",
"arguments": {
"body": "",
"mode": "v2_media",
"request_body": ""
}
}
}'

Example Responses

{
"ok": true,
"message": "Tool leonardo-ai.leonardo_submit_generation_async executed successfully.",
"note": "Response shape varies by MCP tool. Inspect live responses for exact fields."
}