Starts up to 50 generations in one request. They’re priced and held together, so either all start or none do, and each then runs as its own generation with this batch’s batch_id. Read each one with GET /v1/generations/{id}. One request that would sexualise a real person from a photo you uploaded refuses the whole batch with 422 sexualized_real_person.
Needs an API key with the generations:write scope.
A key you generate for this request, such as a UUID, so a retry never starts a second run. A retry with the same key and body returns the same generation as it is now, marked Idempotent-Replayed: true. The same key with a different body is a 409. A key belongs to your workspace and doesn't expire, so use a new one for each new request.
{"docsConfig":{"theme":"luma","$schema":"https://mintlify.com/docs.json","name":"Leap","description":"Generate images, video and audio with Veo, Kling, Seedance, FLUX, GPT Image, ElevenLabs and more, through one REST API and one balance. No key yet? Browse models and schemas at https://api.tryleap.ai/v1/public/models.","colors":{"primary":"#4F39F6","light":"#777FFF","dark":"#4F39F6"},"logo":{"light":"https://mintcdn.com/leap-0e8117eb/HU8mATp2ehtMskps/logo/light.svg?fit=max\u0026auto=format\u0026n=HU8mATp2ehtMskps\u0026q=85\u0026s=a5c8ec9980a555c60231ada77cecaeb3","dark":"https://mintcdn.com/leap-0e8117eb/HU8mATp2ehtMskps/logo/dark.svg?fit=max\u0026auto=format\u0026n=HU8mATp2ehtMskps\u0026q=85\u0026s=1fcfe7f18026357dff94cf9682fb329a"},"favicon":"https://mintcdn.com/leap-0e8117eb/HU8mATp2ehtMskps/favicon.svg?fit=max\u0026auto=format\u0026n=HU8mATp2ehtMskps\u0026q=85\u0026s=cadb07c0e43b32f72651cb7e3dcb63ba","api":{"playground":{"display":"interactive"},"examples":{"defaults":"required","languages":["curl","typescript","python"],"prefill":true},"url":"full"},"appearance":{"default":"system","strict":false},"background":{"color":{"light":"#FFFFFF","dark":"#171715"}},"navbar":{"links":[{"href":"https://app.tryleap.ai/go","label":"Studio"}],"primary":{"type":"button","label":"Get an API key","href":"https://app.tryleap.ai/go/api?utm_source=tryleap\u0026utm_medium=docs\u0026utm_campaign=%2Fdocs\u0026utm_content=navbar"}},"footer":{"socials":{"website":"https://www.tryleap.ai"},"links":[{"header":"Product","items":[{"label":"Studio","href":"https://app.tryleap.ai/go"},{"label":"Models","href":"https://www.tryleap.ai/models"},{"label":"Recipes","href":"https://www.tryleap.ai/recipes"},{"label":"Pricing","href":"https://www.tryleap.ai/pricing"}]},{"header":"Developers","items":[{"label":"Get an API key","href":"https://app.tryleap.ai/go/api?utm_source=tryleap\u0026utm_medium=docs\u0026utm_campaign=%2Fdocs\u0026utm_content=footer"},{"label":"Connect an agent","href":"https://app.tryleap.ai/go/connect?utm_source=tryleap\u0026utm_medium=docs\u0026utm_campaign=%2Fdocs\u0026utm_content=footer"},{"label":"Leap skill","href":"https://www.tryleap.ai/skills/leap/SKILL.md"},{"label":"llms.txt","href":"https://www.tryleap.ai/docs/llms.txt"}]},{"header":"Legal","items":[{"label":"Terms","href":"https://app.tryleap.ai/legal/terms"},{"label":"Privacy","href":"https://app.tryleap.ai/legal/privacy"},{"label":"Acceptable use","href":"https://app.tryleap.ai/legal/acceptable-use"}]}]},"search":{"prompt":"Search the Leap docs"},"seo":{"metatags":{"og:site_name":"Leap","og:type":"website","twitter:card":"summary_large_image"},"organization":{"name":"Leap","url":"https://www.tryleap.ai","logo":"https://www.tryleap.ai/icon-512.png"},"indexing":"navigable"},"fonts":{"family":"Geist","weight":400},"icons":{"library":"lucide"},"styling":{"eyebrows":"section","codeblocks":{"theme":"css-variables"},"latex":true},"integrations":{"posthog":{"apiKey":"phc_y6yy24Kn4vwUkaMxb5LCWJrffeBzUQZRh2p4UhsETqYe","apiHost":"https://www.tryleap.ai/ingest","sessionRecording":true}},"errors":{"404":{"redirect":false,"title":"Page not found","description":"Search the docs, or start from the [quickstart](/quickstart)."}},"contextual":{"options":["copy","view","claude","chatgpt",{"title":"Install the Leap skill","description":"Teach Claude Code, Codex and other agents the Leap API","icon":"terminal","href":"https://www.tryleap.ai/skills/leap/SKILL.md"},{"title":"Connect Leap's MCP server","description":"Make images, video and audio from Claude, ChatGPT, Cursor or VS Code","icon":"plug","href":"https://app.tryleap.ai/go/connect?utm_source=tryleap\u0026utm_medium=docs\u0026utm_campaign=%2Fdocs\u0026utm_content=card"}],"display":"header"},"thumbnails":{"appearance":"dark","background":"https://mintcdn.com/leap-0e8117eb/HU8mATp2ehtMskps/images/og-background.png?fit=max\u0026auto=format\u0026n=HU8mATp2ehtMskps\u0026q=85\u0026s=3475b40ff2d9769cd0ad2ba9e37c1a96","fonts":{"family":"Geist"}},"metadata":{"timestamp":true},"markdown":{"instructions":["Leap's API is at https://api.tryleap.ai. Send the key in the x-api-key header or as Authorization: Bearer; keys start with leap_.","Take model IDs and input schemas from GET /v1/models/{creator}/{name}, or from https://api.tryleap.ai/v1/public/models without a key. Never guess an input field: unknown fields are a 400.","Model inputs take uploaded file IDs (file_...), never URLs. A kept character's ID (chr_..., POST /v1/characters) goes wherever an image file does and keeps the character the same across runs.","To give a coding agent the whole API, install the Leap skill: curl -fsSL https://www.tryleap.ai/install.sh | sh","To make media from ChatGPT, Claude or another MCP client without code, connect Leap's MCP server at https://app.tryleap.ai/api/mcp; see https://www.tryleap.ai/docs/mcp.","The full OpenAPI 3.1 spec is at https://www.tryleap.ai/docs/openapi.json."]},"navigation":{"global":{"anchors":[{"anchor":"Model catalog","icon":"sparkles","href":"https://www.tryleap.ai/models"},{"anchor":"Connect an agent","icon":"plug","href":"https://app.tryleap.ai/go/connect?utm_source=tryleap\u0026utm_medium=docs\u0026utm_campaign=%2Fdocs\u0026utm_content=anchor"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"leap-0e8117eb","hasAudioNarration":false,"actualSubdomain":"leap-0e8117eb","customDomains":["www.tryleap.ai"],"gitSource":{"type":"github","owner":"goatedventures","repo":"leap-neo","deployBranch":"main","contentDirectory":"apps/docs","isPrivate":true,"mountPath":"","label":""},"feedback":{"agentFeedback":true},"entitlements":{"AI_CHAT":{"status":"DISABLED"},"WEB_MCP":{"status":"DISABLED"},"NARRATION":{"status":"DISABLED"}},"buildId":"6ae36428f2e535e50ffb93a5","clientVersion":"0.0.4094","searchFilterCounts":[{"language":"default","tag":"API reference","count":36},{"language":"default","tag":"Guides","count":23},{"language":"default","tag":"Build","count":8},{"language":"default","tag":"Webhooks","count":8},{"language":"default","tag":"MCP server","count":7},{"language":"default","tag":"Characters","count":5},{"language":"default","tag":"Files","count":5},{"language":"default","tag":"Generations","count":5},{"language":"default","tag":"Get started","count":4},{"language":"default","tag":"Events","count":4}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"/docs","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"comment-mode","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":true},"customCss":[{"filePath":"style.css","content":"/* cyrillic-ext */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 400 600;\n font-display: swap;\n src: url(/docs/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrodmgPn.woff2) format('woff2');\n unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;\n}\n/* cyrillic */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 400 600;\n font-display: swap;\n src: url(/docs/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrMdmgPn.woff2) format('woff2');\n unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;\n}\n/* symbols2 */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 400 600;\n font-display: swap;\n src: url(/docs/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFg08vz7ehw.woff2) format('woff2');\n unicode-range: U+2000-2001, U+2004-2008, U+200A, U+23B8-23BD, U+2500-259F;\n}\n/* vietnamese */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 400 600;\n font-display: swap;\n src: url(/docs/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrgdmgPn.woff2) format('woff2');\n unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;\n}\n/* latin-ext */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 400 600;\n font-display: swap;\n src: url(/docs/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrkdmgPn.woff2) format('woff2');\n unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;\n}\n/* latin */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 400 600;\n font-display: swap;\n src: url(/docs/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrcdmg.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n}\ncode,pre,kbd,samp{font-family:\"Geist Mono\", ui-monospace, SFMono-Regular, Menlo, monospace!important}.eyebrow,.sidebar-group-header{text-transform:none!important}html.dark #topbar-cta-button a{background-color:#4f39f6!important}html.dark #topbar-cta-button span{color:#ffffff!important}:root{--mint-color-background: #171715;--mint-foreground: #ededed;--mint-color-text: #ededed;--mint-token-string: #777fff;--mint-token-string-expression: #777fff;--mint-token-link: #777fff;--mint-token-constant: #ededed;--mint-token-keyword: #ededed;--mint-token-function: #ededed;--mint-token-parameter: #ededed;--mint-token-comment: #a1a1a1;--mint-token-punctuation: #a1a1a1}.code-block,.code-group{background-color:#171715!important}"}],"page":{"pagePath":"api-reference/batches/create-a-batch","slug":"/api-reference/batches/create-a-batch","pageMetadata":{"title":"Create a batch","description":"Starts up to 50 generations in one request. They're priced and held together, so either all start or none do, and each then runs as its own generation with this batch's `batch_id`. Read each one with `GET /v1/generations/{id}`. One request that would sexualise a real person from a photo you uploaded refuses the whole batch with `422 sexualized_real_person`.\n\nNeeds an API key with the `generations:write` scope.","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/batches","href":"/api-reference/batches/create-a-batch","autogeneratedByOpenApi":true},"description":{"compiledSource":"\"use strict\";\nconst {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n code: \"code\",\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_Fragment, {\n children: [_jsxs(_components.p, {\n children: [\"Starts up to 50 generations in one request. They’re priced and held together, so either all start or none do, and each then runs as its own generation with this batch’s \", _jsx(_components.code, {\n children: \"batch_id\"\n }), \". Read each one with \", _jsx(_components.code, {\n children: \"GET /v1/generations/{id}\"\n }), \". One request that would sexualise a real person from a photo you uploaded refuses the whole batch with \", _jsx(_components.code, {\n children: \"422 sexualized_real_person\"\n }), \".\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Needs an API key with the \", _jsx(_components.code, {\n children: \"generations:write\"\n }), \" scope.\"]\n })]\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"codeStyling":{"theme":"css-variables"},"config":{},"pageMetadata":{"title":"Create a batch","description":"Starts up to 50 generations in one request. They're priced and held together, so either all start or none do, and each then runs as its own generation with this batch's `batch_id`. Read each one with `GET /v1/generations/{id}`. One request that would sexualise a real person from a photo you uploaded refuses the whole batch with `422 sexualized_real_person`.\n\nNeeds an API key with the `generations:write` scope.","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/batches","href":"/api-reference/batches/create-a-batch","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"operationId":"createBatch","summary":"Create a batch","description":"Starts up to 50 generations in one request. They're priced and held together, so either all start or none do, and each then runs as its own generation with this batch's `batch_id`. Read each one with `GET /v1/generations/{id}`. One request that would sexualise a real person from a photo you uploaded refuses the whole batch with `422 sexualized_real_person`.\n\nNeeds an API key with the `generations:write` scope.","tags":["Batches"],"parameters":["86b5755b-5f56-481c-8991-6fc9fe7f414f"],"requestBody":"7f70d6d9-0981-4fa1-86e6-96b6c7448b56","responses":{"201":"8af610e2-1cbe-4fcf-8ca3-364c527cb24a","400":"459bbc62-e1b4-4a3c-853a-b594cd83c8c2","401":"ae1944e5-c7d4-4495-8b95-de435ee537c1","402":"ca1bf7f6-a2e4-4700-955f-ab136b2c10a5","403":"2cf70abc-4190-4003-987c-ce1478978008","409":"1185608c-16ae-4232-a0ad-4ed1741d0552","410":"c1cfcaad-6898-4cc6-97da-f9a7c3990042","422":"34f79fe0-b835-4c43-86d7-531272b57efc","429":"a4c2fdf7-cace-4b9a-90f9-25fe3b02f833","503":"9c21ad89-28c2-424d-9891-ec22946b996f"},"method":"post","type":"path","servers":["f01f3dd6-cc2d-41e2-a009-e8c7b8d34abd"],"security":["8f394945-6e6a-438b-a713-b9b98ddec0d5","f875416d-92de-4b7b-ae9f-7c93b205b653"],"path":"/v1/batches","baseUrlOptions":["https://api.tryleap.ai"],"title":"Create a batch","codeSamples":[],"requestExampleLanguages":["bash","typescript","python"],"requiredOnlyExamples":true,"requestExampleType":"generated","responseExampleType":"generated","prefillPlaygroundWithExample":true,"prefillPlaygroundExamples":[{"body.requests.items.0.model":"\u003cstring>","body.requests.items.0.webhook":"\u003cstring>"}],"urlDisplay":"full"},"dependencies":{"parameters":{"86b5755b-5f56-481c-8991-6fc9fe7f414f":{"in":"header","name":"Idempotency-Key","schema":{"description":"A key you generate for this request, such as a UUID, so a retry never starts a second run. A retry with the same key and body returns the same generation as it is now, marked `Idempotent-Replayed: true`. The same key with a different body is a `409`. A key belongs to your workspace and doesn't expire, so use a new one for each new request.","example":"7f1c2a9e-3b4d-4e8a-9c21-5d0f6a7b8c90","type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x21-\\x7e]+$","uniqueKey":"","typeLabel":"string"},"description":"A key you generate for this request, such as a UUID, so a retry never starts a second run. A retry with the same key and body returns the same generation as it is now, marked `Idempotent-Replayed: true`. The same key with a different body is a `409`. A key belongs to your workspace and doesn't expire, so use a new one for each new request."}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"requests":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"object","properties":{"model":{"type":"string","maxLength":100,"pattern":"^[a-z0-9][a-z0-9-]*\\/[a-z0-9][a-z0-9.-]*(@[1-9][0-9]{0,3})?$","description":"The model to call, as creator/name. GET /v1/models lists them.","isRequired":true,"uniqueKey":"requests.items.[INDEX].model","typeLabel":"string"},"input":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"oneOf":[{}],"uniqueKey":"requests.items.[INDEX].input.additionalProperties","typeLabel":"any"},"uniqueKey":"requests.items.[INDEX].input","typeLabel":"object"},"webhook":{"description":"An https URL to POST the generation.succeeded, generation.failed or generation.canceled event to when the run ends, signed with your workspace's default secret (GET /v1/webhooks/default/secret).","type":"string","maxLength":2048,"format":"uri","uniqueKey":"requests.items.[INDEX].webhook","typeLabel":"string\u003curi>"}},"required":["model"],"additionalProperties":false,"uniqueKey":"requests.items.[INDEX]","typeLabel":"object"},"description":"Up to 50 generations, each a model and its input. All are priced and held together.","isRequired":true,"uniqueKey":"requests","typeLabel":"object[]"}},"required":["requests"],"additionalProperties":false,"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"requests":[{"model":"\u003cstring>","input":{},"webhook":"\u003cstring>"}]}}},"exampleType":"generated"}},"exampleType":"generated"},"responses":{"8af610e2-1cbe-4fcf-8ca3-364c527cb24a":{"description":"The batch, with each generation queued.","headers":{"X-Request-Id":{"required":true,"description":"This request's ID. Include it when you contact support; it's also `request_id` in an error.","schema":{"type":"string","description":"This request's ID. Include it when you contact support; it's also `request_id` in an error.","example":"req_01J9Z8Q4N2K7T5V3X6Y8B0C1D2"}},"RateLimit-Limit":{"required":true,"description":"Requests allowed per window from your client.","schema":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Requests allowed per window from your client.","example":300}},"RateLimit-Remaining":{"required":true,"description":"Requests left in the current window.","schema":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Requests left in the current window.","example":299}},"RateLimit-Reset":{"required":true,"description":"Seconds until the window resets.","schema":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Seconds until the window resets.","example":42}},"Idempotent-Replayed":{"schema":{"type":"string","const":"true","description":"Present when this answer replays the first request sent with the same `Idempotency-Key`."}}},"content":{"application/json":{"example":{"id":"bat_5Tq8Lm2Xv9Kr4Wn7Bc1Yd3Hp","object":"batch","data":[{"id":"gen_2Pk7Wd4Qx9Lm1Tn6Vb3Rc8Hy","object":"generation","model":"black-forest-labs/flux-2-pro","modality":"image","status":"queued","provider":null,"revision":"2026-10-02","input":{"prompt":"A fox in the snow, watercolor","aspect_ratio":"1:1","n":1},"output":[],"error":null,"failure_cause":null,"usage":{"cost_usd":null},"source":"api","batch_id":"bat_5Tq8Lm2Xv9Kr4Wn7Bc1Yd3Hp","created_at":"2026-10-04T18:22:41.512Z","started_at":null,"completed_at":null,"slow_at":null,"deadline_at":null,"suggested_recipe":null},{"id":"gen_9Rb3Hy6Tc1Vn8Lm4Qx7Wd2Pk","object":"generation","model":"black-forest-labs/flux-2-pro","modality":"image","status":"queued","provider":null,"revision":"2026-10-02","input":{"prompt":"A fox in the snow, linocut print","aspect_ratio":"1:1","n":1},"output":[],"error":null,"failure_cause":null,"usage":{"cost_usd":null},"source":"api","batch_id":"bat_5Tq8Lm2Xv9Kr4Wn7Bc1Yd3Hp","created_at":"2026-10-04T18:22:41.512Z","started_at":null,"completed_at":null,"slow_at":null,"deadline_at":null,"suggested_recipe":null}]},"schema":{"type":"object","properties":{"id":{"type":"string","description":"The batch's ID, `bat_...`.","isRequired":true,"uniqueKey":"id","typeLabel":"string"},"object":{"type":"string","const":"batch","isRequired":true,"uniqueKey":"object","typeLabel":"string"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The generation's ID, `gen_` and 24 letters and digits.","isRequired":true,"uniqueKey":"data.items.[INDEX].id","typeLabel":"string"},"object":{"type":"string","const":"generation","isRequired":true,"uniqueKey":"data.items.[INDEX].object","typeLabel":"string"},"model":{"type":"string","description":"The model or preset it runs, with a preset's version.","isRequired":true,"uniqueKey":"data.items.[INDEX].model","typeLabel":"string"},"modality":{"type":"string","enum":["image","video","audio","3d","text"],"description":"What it makes: `image`, `video`, `audio`, `3d` or `text`.","isRequired":true,"uniqueKey":"data.items.[INDEX].modality","typeLabel":"enum\u003cstring>"},"status":{"type":"string","enum":["queued","running","succeeded","failed","canceled"],"description":"`queued`, then `running`, then one of `succeeded`, `failed` or `canceled`. Only `succeeded` is charged.","isRequired":true,"uniqueKey":"data.items.[INDEX].status","typeLabel":"enum\u003cstring>"},"provider":{"oneOf":[{"description":"Which upstream ran it, once one did. Informational: the model ID and input stay the same whichever runs it.","type":"string","isRequired":true,"uniqueKey":"data.items.[INDEX].provider.oneOf.0","typeLabel":"string"},{"description":"Which upstream ran it, once one did. Informational: the model ID and input stay the same whichever runs it.","type":"null","isRequired":true,"uniqueKey":"data.items.[INDEX].provider.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.items.[INDEX].provider","typeLabel":"string | null"},"revision":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"The model's schema and price revision the run used.","isRequired":true,"uniqueKey":"data.items.[INDEX].revision","typeLabel":"string"},"input":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"oneOf":[{"type":"string","uniqueKey":"data.items.[INDEX].input.additionalProperties.oneOf.0","typeLabel":"string"},{"type":"number","uniqueKey":"data.items.[INDEX].input.additionalProperties.oneOf.1","typeLabel":"number"},{"type":"boolean","uniqueKey":"data.items.[INDEX].input.additionalProperties.oneOf.2","typeLabel":"boolean"},{"type":"object","additionalProperties":{"oneOf":[{"type":"string","uniqueKey":"data.items.[INDEX].input.additionalProperties.oneOf.3.additionalProperties.oneOf.0","typeLabel":"string"},{"type":"number","uniqueKey":"data.items.[INDEX].input.additionalProperties.oneOf.3.additionalProperties.oneOf.1","typeLabel":"number"},{"type":"boolean","uniqueKey":"data.items.[INDEX].input.additionalProperties.oneOf.3.additionalProperties.oneOf.2","typeLabel":"boolean"}],"uniqueKey":"data.items.[INDEX].input.additionalProperties.oneOf.3.additionalProperties","typeLabel":"string | number | boolean"},"uniqueKey":"data.items.[INDEX].input.additionalProperties.oneOf.3","typeLabel":"object"},{"type":"array","items":{"type":"string","uniqueKey":"data.items.[INDEX].input.additionalProperties.oneOf.4.items.[INDEX]","typeLabel":"string"},"uniqueKey":"data.items.[INDEX].input.additionalProperties.oneOf.4","typeLabel":"string[]"}],"uniqueKey":"data.items.[INDEX].input.additionalProperties","typeLabel":"string | number | boolean | object | string[]"},"description":"The input as it runs, with the defaults filled in.","isRequired":true,"uniqueKey":"data.items.[INDEX].input","typeLabel":"object"},"output":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["image","video","audio","3d","text"],"description":"What the file is: `image`, `video`, `audio`, `3d` or `text`.","isRequired":true,"uniqueKey":"data.items.[INDEX].output.items.[INDEX].type","typeLabel":"enum\u003cstring>"},"url":{"type":"string","format":"uri","description":"A signed link to the file. Download what you keep: links expire after 24 hours, and reading the generation again signs fresh ones.","isRequired":true,"uniqueKey":"data.items.[INDEX].output.items.[INDEX].url","typeLabel":"string\u003curi>"},"expires_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"When `url` stops working, 24 hours after it was signed.","isRequired":true,"uniqueKey":"data.items.[INDEX].output.items.[INDEX].expires_at","typeLabel":"string\u003cdate-time>"},"content_type":{"type":"string","description":"The file's media type, such as `image/jpeg` or `video/mp4`.","isRequired":true,"uniqueKey":"data.items.[INDEX].output.items.[INDEX].content_type","typeLabel":"string"},"width":{"oneOf":[{"type":"integer","description":"Width in pixels; null for a sound.","maximum":9007199254740991,"minimum":0,"exclusiveMinimum":true,"isRequired":true,"uniqueKey":"data.items.[INDEX].output.items.[INDEX].width.oneOf.0","typeLabel":"integer"},{"type":"null","description":"Width in pixels; null for a sound.","isRequired":true,"uniqueKey":"data.items.[INDEX].output.items.[INDEX].width.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.items.[INDEX].output.items.[INDEX].width","typeLabel":"integer | null"},"height":{"oneOf":[{"type":"integer","description":"Height in pixels; null for a sound.","maximum":9007199254740991,"minimum":0,"exclusiveMinimum":true,"isRequired":true,"uniqueKey":"data.items.[INDEX].output.items.[INDEX].height.oneOf.0","typeLabel":"integer"},{"type":"null","description":"Height in pixels; null for a sound.","isRequired":true,"uniqueKey":"data.items.[INDEX].output.items.[INDEX].height.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.items.[INDEX].output.items.[INDEX].height","typeLabel":"integer | null"},"poster":{"description":"For a video: a JPEG of a frame from its middle, about 720 pixels on the long side. Absent when none was made.","type":"object","properties":{"url":{"type":"string","format":"uri","description":"A signed link to the poster, which expires with the video's link.","isRequired":true,"uniqueKey":"data.items.[INDEX].output.items.[INDEX].poster.url","typeLabel":"string\u003curi>"},"expires_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","isRequired":true,"uniqueKey":"data.items.[INDEX].output.items.[INDEX].poster.expires_at","typeLabel":"string\u003cdate-time>"},"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"isRequired":true,"uniqueKey":"data.items.[INDEX].output.items.[INDEX].poster.width","typeLabel":"integer"},"height":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"isRequired":true,"uniqueKey":"data.items.[INDEX].output.items.[INDEX].poster.height","typeLabel":"integer"}},"required":["url","expires_at","width","height"],"additionalProperties":false,"uniqueKey":"data.items.[INDEX].output.items.[INDEX].poster","typeLabel":"object"}},"required":["type","url","expires_at","content_type","width","height"],"additionalProperties":false,"uniqueKey":"data.items.[INDEX].output.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"data.items.[INDEX].output","typeLabel":"object[]"},"error":{"oneOf":[{"type":"object","description":"Why a `failed` run failed, such as a refused prompt or a provider error; null otherwise. A failed run isn't charged.","required":["message"],"properties":{"message":{"type":"string","isRequired":true,"uniqueKey":"data.items.[INDEX].error.oneOf.0.message","typeLabel":"string"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"data.items.[INDEX].error.oneOf.0","typeLabel":"object"},{"type":"null","description":"Why a `failed` run failed, such as a refused prompt or a provider error; null otherwise. A failed run isn't charged.","isRequired":true,"uniqueKey":"data.items.[INDEX].error.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.items.[INDEX].error","typeLabel":"object | null"},"failure_cause":{"oneOf":[{"type":"string","description":"What made a `failed` run fail, for a program to branch on: `provider_error`, `provider_refused` (the model's safety filter said no), `photo_blocked` (the photo check refused the photo), `timeout`, `outage` (the provider had a declared incident or could not serve Leap), `input_removed` (an input file was gone) or `input_rejected` (the provider couldn't use an input file: too small, an unreadable format, or no face). Null for any other run, and for a failure from before causes were recorded.","enum":["provider_error","provider_refused","photo_blocked","timeout","outage","input_removed","input_rejected"],"isRequired":true,"uniqueKey":"data.items.[INDEX].failure_cause.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","description":"What made a `failed` run fail, for a program to branch on: `provider_error`, `provider_refused` (the model's safety filter said no), `photo_blocked` (the photo check refused the photo), `timeout`, `outage` (the provider had a declared incident or could not serve Leap), `input_removed` (an input file was gone) or `input_rejected` (the provider couldn't use an input file: too small, an unreadable format, or no face). Null for any other run, and for a failure from before causes were recorded.","isRequired":true,"uniqueKey":"data.items.[INDEX].failure_cause.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.items.[INDEX].failure_cause","typeLabel":"enum\u003cstring> | null"},"usage":{"type":"object","properties":{"cost_usd":{"oneOf":[{"description":"What the run cost, as an exact decimal string in US dollars; null until it's charged.","type":"string","isRequired":true,"uniqueKey":"data.items.[INDEX].usage.cost_usd.oneOf.0","typeLabel":"string"},{"description":"What the run cost, as an exact decimal string in US dollars; null until it's charged.","type":"null","isRequired":true,"uniqueKey":"data.items.[INDEX].usage.cost_usd.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.items.[INDEX].usage.cost_usd","typeLabel":"string | null"}},"required":["cost_usd"],"additionalProperties":false,"description":"What the run cost your workspace.","isRequired":true,"uniqueKey":"data.items.[INDEX].usage","typeLabel":"object"},"source":{"oneOf":[{"type":"string","description":"Where it was started: `api`, `mcp` or `studio`.","enum":["studio","api","mcp"],"isRequired":true,"uniqueKey":"data.items.[INDEX].source.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","description":"Where it was started: `api`, `mcp` or `studio`.","isRequired":true,"uniqueKey":"data.items.[INDEX].source.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.items.[INDEX].source","typeLabel":"enum\u003cstring> | null"},"batch_id":{"oneOf":[{"description":"The batch it belongs to, `bat_...`; null if none.","type":"string","isRequired":true,"uniqueKey":"data.items.[INDEX].batch_id.oneOf.0","typeLabel":"string"},{"description":"The batch it belongs to, `bat_...`; null if none.","type":"null","isRequired":true,"uniqueKey":"data.items.[INDEX].batch_id.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.items.[INDEX].batch_id","typeLabel":"string | null"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"When it was created.","isRequired":true,"uniqueKey":"data.items.[INDEX].created_at","typeLabel":"string\u003cdate-time>"},"started_at":{"oneOf":[{"type":"string","description":"When it started running; null while queued.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","isRequired":true,"uniqueKey":"data.items.[INDEX].started_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","description":"When it started running; null while queued.","isRequired":true,"uniqueKey":"data.items.[INDEX].started_at.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.items.[INDEX].started_at","typeLabel":"string\u003cdate-time> | null"},"completed_at":{"oneOf":[{"type":"string","description":"When it reached a final status; null before.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","isRequired":true,"uniqueKey":"data.items.[INDEX].completed_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","description":"When it reached a final status; null before.","isRequired":true,"uniqueKey":"data.items.[INDEX].completed_at.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.items.[INDEX].completed_at","typeLabel":"string\u003cdate-time> | null"},"slow_at":{"oneOf":[{"type":"string","description":"While a preset runs: when it counts as slow, one and a half times what Leap's runs of it take after `started_at`, scaled to this run's length, resolution and count. From then on a cancel works whatever the run has done, even once its `preview` shows. Null for any other run.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","isRequired":true,"uniqueKey":"data.items.[INDEX].slow_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","description":"While a preset runs: when it counts as slow, one and a half times what Leap's runs of it take after `started_at`, scaled to this run's length, resolution and count. From then on a cancel works whatever the run has done, even once its `preview` shows. Null for any other run.","isRequired":true,"uniqueKey":"data.items.[INDEX].slow_at.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.items.[INDEX].slow_at","typeLabel":"string\u003cdate-time> | null"},"deadline_at":{"oneOf":[{"type":"string","description":"While a preset runs: when Leap stops it if it hasn't finished, three times what Leap's runs of it take after `started_at`, scaled to this run's length, resolution and count, between 5 minutes (2 for a picture) and 12. It then fails with the `failure_cause` `timeout` and costs nothing. Null for any other run.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","isRequired":true,"uniqueKey":"data.items.[INDEX].deadline_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","description":"While a preset runs: when Leap stops it if it hasn't finished, three times what Leap's runs of it take after `started_at`, scaled to this run's length, resolution and count, between 5 minutes (2 for a picture) and 12. It then fails with the `failure_cause` `timeout` and costs nothing. Null for any other run.","isRequired":true,"uniqueKey":"data.items.[INDEX].deadline_at.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.items.[INDEX].deadline_at","typeLabel":"string\u003cdate-time> | null"},"suggested_recipe":{"oneOf":[{"type":"object","description":"For a run of a model, not a recipe: the recipe made for what its words and files ask, when they clearly ask for one, such as two photos and \"put the outfit from photo 2 on photo 1\" on an image model (Virtual try-on), or a character sheet from a picture (Consistent character). Read from the words and files alone, so the same request always gets the same answer. Null when nothing matches clearly.","required":["model","name","tuned_for","input","cost_usd"],"properties":{"model":{"type":"string","maxLength":100,"pattern":"^[a-z0-9][a-z0-9-]*\\/[a-z0-9][a-z0-9.-]*(@[1-9][0-9]{0,3})?$","description":"The recipe, with its version, such as `leap/virtual-try-on@1`.","isRequired":true,"uniqueKey":"data.items.[INDEX].suggested_recipe.oneOf.0.model","typeLabel":"string"},"name":{"type":"string","description":"The recipe's name: `Virtual try-on`.","isRequired":true,"uniqueKey":"data.items.[INDEX].suggested_recipe.oneOf.0.name","typeLabel":"string"},"tuned_for":{"type":"string","description":"What it is tuned for, in a few words: `outfits`.","isRequired":true,"uniqueKey":"data.items.[INDEX].suggested_recipe.oneOf.0.tuned_for","typeLabel":"string"},"input":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"oneOf":[{"type":"string","uniqueKey":"data.items.[INDEX].suggested_recipe.oneOf.0.input.additionalProperties.oneOf.0","typeLabel":"string"},{"type":"number","uniqueKey":"data.items.[INDEX].suggested_recipe.oneOf.0.input.additionalProperties.oneOf.1","typeLabel":"number"},{"type":"boolean","uniqueKey":"data.items.[INDEX].suggested_recipe.oneOf.0.input.additionalProperties.oneOf.2","typeLabel":"boolean"},{"type":"object","additionalProperties":{"oneOf":[{"type":"string","uniqueKey":"data.items.[INDEX].suggested_recipe.oneOf.0.input.additionalProperties.oneOf.3.additionalProperties.oneOf.0","typeLabel":"string"},{"type":"number","uniqueKey":"data.items.[INDEX].suggested_recipe.oneOf.0.input.additionalProperties.oneOf.3.additionalProperties.oneOf.1","typeLabel":"number"},{"type":"boolean","uniqueKey":"data.items.[INDEX].suggested_recipe.oneOf.0.input.additionalProperties.oneOf.3.additionalProperties.oneOf.2","typeLabel":"boolean"}],"uniqueKey":"data.items.[INDEX].suggested_recipe.oneOf.0.input.additionalProperties.oneOf.3.additionalProperties","typeLabel":"string | number | boolean"},"uniqueKey":"data.items.[INDEX].suggested_recipe.oneOf.0.input.additionalProperties.oneOf.3","typeLabel":"object"},{"type":"array","items":{"type":"string","uniqueKey":"data.items.[INDEX].suggested_recipe.oneOf.0.input.additionalProperties.oneOf.4.items.[INDEX]","typeLabel":"string"},"uniqueKey":"data.items.[INDEX].suggested_recipe.oneOf.0.input.additionalProperties.oneOf.4","typeLabel":"string[]"}],"uniqueKey":"data.items.[INDEX].suggested_recipe.oneOf.0.input.additionalProperties","typeLabel":"string | number | boolean | object | string[]"},"description":"The recipe's input from this run: its files in the recipe's slots, and the words it could fill. Send it to `POST /v1/generations` with `model` as it is, or add what the recipe still needs; `GET /v1/models/{creator}/{name}` has its schema.","isRequired":true,"uniqueKey":"data.items.[INDEX].suggested_recipe.oneOf.0.input","typeLabel":"object"},"cost_usd":{"oneOf":[{"description":"What a run of it with `input` costs, as an exact decimal string in US dollars; null for a recipe priced on the length of your video or sound, which `POST /v1/quotes` prices.","type":"string","isRequired":true,"uniqueKey":"data.items.[INDEX].suggested_recipe.oneOf.0.cost_usd.oneOf.0","typeLabel":"string"},{"description":"What a run of it with `input` costs, as an exact decimal string in US dollars; null for a recipe priced on the length of your video or sound, which `POST /v1/quotes` prices.","type":"null","isRequired":true,"uniqueKey":"data.items.[INDEX].suggested_recipe.oneOf.0.cost_usd.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.items.[INDEX].suggested_recipe.oneOf.0.cost_usd","typeLabel":"string | null"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"data.items.[INDEX].suggested_recipe.oneOf.0","typeLabel":"object"},{"type":"null","description":"For a run of a model, not a recipe: the recipe made for what its words and files ask, when they clearly ask for one, such as two photos and \"put the outfit from photo 2 on photo 1\" on an image model (Virtual try-on), or a character sheet from a picture (Consistent character). Read from the words and files alone, so the same request always gets the same answer. Null when nothing matches clearly.","isRequired":true,"uniqueKey":"data.items.[INDEX].suggested_recipe.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.items.[INDEX].suggested_recipe","typeLabel":"object | null"},"preview":{"description":"While a preset that makes a still first is running: that still, once it exists, before the video it becomes. Absent for every other run, and for a run whose video also reads words or a photo you sent, such as a line to say or a photo the clip starts from: that still comes with the video. Also absent for the rest of a UTC day once 10 of the workspace's runs that showed one failed for their input.","type":"object","properties":{"url":{"type":"string","format":"uri","description":"A signed link to a smaller JPEG of the still, about 960 pixels on the long side. It works for 10 minutes; read the run again for a fresh one. The still itself comes with the finished run's output.","isRequired":true,"uniqueKey":"data.items.[INDEX].preview.url","typeLabel":"string\u003curi>"},"expires_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","isRequired":true,"uniqueKey":"data.items.[INDEX].preview.expires_at","typeLabel":"string\u003cdate-time>"},"width":{"oneOf":[{"type":"integer","maximum":9007199254740991,"minimum":0,"exclusiveMinimum":true,"isRequired":true,"uniqueKey":"data.items.[INDEX].preview.width.oneOf.0","typeLabel":"integer"},{"type":"null","isRequired":true,"uniqueKey":"data.items.[INDEX].preview.width.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.items.[INDEX].preview.width","typeLabel":"integer | null"},"height":{"oneOf":[{"type":"integer","maximum":9007199254740991,"minimum":0,"exclusiveMinimum":true,"isRequired":true,"uniqueKey":"data.items.[INDEX].preview.height.oneOf.0","typeLabel":"integer"},{"type":"null","isRequired":true,"uniqueKey":"data.items.[INDEX].preview.height.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.items.[INDEX].preview.height","typeLabel":"integer | null"}},"required":["url","expires_at","width","height"],"additionalProperties":false,"uniqueKey":"data.items.[INDEX].preview","typeLabel":"object"}},"required":["id","object","model","modality","status","provider","revision","input","output","error","failure_cause","usage","source","batch_id","created_at","started_at","completed_at","slow_at","deadline_at","suggested_recipe"],"additionalProperties":false,"description":"One run of a model or preset, with its status, its outputs and what it cost.","uniqueKey":"data.items.[INDEX]","typeLabel":"object"},"description":"Its generations, in the order you sent them.","isRequired":true,"uniqueKey":"data","typeLabel":"object[]"}},"required":["id","object","data"],"additionalProperties":false,"description":"Up to 50 generations priced and held together, each run on its own.","uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"id":"bat_5Tq8Lm2Xv9Kr4Wn7Bc1Yd3Hp","object":"batch","data":[{"id":"gen_2Pk7Wd4Qx9Lm1Tn6Vb3Rc8Hy","object":"generation","model":"black-forest-labs/flux-2-pro","modality":"image","status":"queued","provider":null,"revision":"2026-10-02","input":{"prompt":"A fox in the snow, watercolor","aspect_ratio":"1:1","n":1},"output":[],"error":null,"failure_cause":null,"usage":{"cost_usd":null},"source":"api","batch_id":"bat_5Tq8Lm2Xv9Kr4Wn7Bc1Yd3Hp","created_at":"2026-10-04T18:22:41.512Z","started_at":null,"completed_at":null,"slow_at":null,"deadline_at":null,"suggested_recipe":null},{"id":"gen_9Rb3Hy6Tc1Vn8Lm4Qx7Wd2Pk","object":"generation","model":"black-forest-labs/flux-2-pro","modality":"image","status":"queued","provider":null,"revision":"2026-10-02","input":{"prompt":"A fox in the snow, linocut print","aspect_ratio":"1:1","n":1},"output":[],"error":null,"failure_cause":null,"usage":{"cost_usd":null},"source":"api","batch_id":"bat_5Tq8Lm2Xv9Kr4Wn7Bc1Yd3Hp","created_at":"2026-10-04T18:22:41.512Z","started_at":null,"completed_at":null,"slow_at":null,"deadline_at":null,"suggested_recipe":null}]}}},"exampleType":"examples"}},"exampleType":"examples"},"459bbc62-e1b4-4a3c-853a-b594cd83c8c2":{"description":"`invalid_parameter`, `conflicting_credentials`","headers":{"X-Request-Id":{"required":true,"description":"This request's ID. Include it when you contact support; it's also `request_id` in an error.","schema":{"type":"string","description":"This request's ID. Include it when you contact support; it's also `request_id` in an error.","example":"req_01J9Z8Q4N2K7T5V3X6Y8B0C1D2"}},"RateLimit-Limit":{"required":true,"description":"Requests allowed per window from your client.","schema":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Requests allowed per window from your client.","example":300}},"RateLimit-Remaining":{"required":true,"description":"Requests left in the current window.","schema":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Requests left in the current window.","example":299}},"RateLimit-Reset":{"required":true,"description":"Seconds until the window resets.","schema":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Seconds until the window resets.","example":42}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","rate_limit_error","authentication_error","permission_error","conflict_error","billing_error","api_error"],"description":"The kind of error. Branch on `type` and `code`, never on `message`.","isRequired":true,"uniqueKey":"error.type","typeLabel":"enum\u003cstring>"},"code":{"type":"string","enum":["invalid_parameter","invalid_request","conflicting_credentials","placeholder_in_path","method_not_allowed","payload_too_large","unsupported_media_type","ip_rate_limit_exceeded","authentication_required","missing_api_key","invalid_api_key","permission_denied","not_found","resource_not_found","gone","conflict","file_in_use","unpaid_failure_cap","photo_blocked","sexualized_real_person","rate_limit_exceeded","insufficient_credit","top_up_required","service_unavailable","internal_error"],"description":"A stable code for this error. Each one is explained at https://www.tryleap.ai/docs/errors.","isRequired":true,"uniqueKey":"error.code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","description":"What went wrong, written for a person. It can change; don't parse it.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"param":{"oneOf":[{"description":"For a `400`, the field at fault, such as `input.prompt`; otherwise null.","type":"string","isRequired":true,"uniqueKey":"error.param.oneOf.0","typeLabel":"string"},{"description":"For a `400`, the field at fault, such as `input.prompt`; otherwise null.","type":"null","isRequired":true,"uniqueKey":"error.param.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"error.param","typeLabel":"string | null"},"doc_url":{"oneOf":[{"description":"A page that explains this error, when there is one.","type":"string","isRequired":true,"uniqueKey":"error.doc_url.oneOf.0","typeLabel":"string"},{"description":"A page that explains this error, when there is one.","type":"null","isRequired":true,"uniqueKey":"error.doc_url.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"error.doc_url","typeLabel":"string | null"},"request_id":{"type":"string","description":"This request's ID, as in the `X-Request-Id` header. Include it when you contact support.","isRequired":true,"uniqueKey":"error.request_id","typeLabel":"string"},"moderation_reason":{"description":"Only on `photo_blocked`: why the photo check refused the photo, `minor` (someone in it may be under 18) or `nudity`.","type":"string","enum":["minor","nudity"],"uniqueKey":"error.moderation_reason","typeLabel":"enum\u003cstring>"}},"required":["type","code","message","param","doc_url","request_id"],"additionalProperties":false,"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"additionalProperties":false,"uniqueKey":"","typeLabel":"object"},"examples":{"invalid_parameter":{"title":"invalid_parameter","value":{"error":{"type":"invalid_request_error","code":"invalid_parameter","message":"Invalid request parameters.","param":null,"doc_url":null,"request_id":"req_8kQ2vX9mR4tL6nB1cW3yZ5aD"}}},"conflicting_credentials":{"title":"conflicting_credentials","value":{"error":{"type":"invalid_request_error","code":"conflicting_credentials","message":"Send one API key.","param":null,"doc_url":null,"request_id":"req_8kQ2vX9mR4tL6nB1cW3yZ5aD"}}}},"exampleType":"examples"}},"exampleType":"examples"},"ae1944e5-c7d4-4495-8b95-de435ee537c1":{"description":"`authentication_required`","headers":{"X-Request-Id":{"required":true,"description":"This request's ID. Include it when you contact support; it's also `request_id` in an error.","schema":{"type":"string","description":"This request's ID. Include it when you contact support; it's also `request_id` in an error.","example":"req_01J9Z8Q4N2K7T5V3X6Y8B0C1D2"}},"RateLimit-Limit":{"required":true,"description":"Requests allowed per window from your client.","schema":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Requests allowed per window from your client.","example":300}},"RateLimit-Remaining":{"required":true,"description":"Requests left in the current window.","schema":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Requests left in the current window.","example":299}},"RateLimit-Reset":{"required":true,"description":"Seconds until the window resets.","schema":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Seconds until the window resets.","example":42}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","rate_limit_error","authentication_error","permission_error","conflict_error","billing_error","api_error"],"description":"The kind of error. Branch on `type` and `code`, never on `message`.","isRequired":true,"uniqueKey":"error.type","typeLabel":"enum\u003cstring>"},"code":{"type":"string","enum":["invalid_parameter","invalid_request","conflicting_credentials","placeholder_in_path","method_not_allowed","payload_too_large","unsupported_media_type","ip_rate_limit_exceeded","authentication_required","missing_api_key","invalid_api_key","permission_denied","not_found","resource_not_found","gone","conflict","file_in_use","unpaid_failure_cap","photo_blocked","sexualized_real_person","rate_limit_exceeded","insufficient_credit","top_up_required","service_unavailable","internal_error"],"description":"A stable code for this error. Each one is explained at https://www.tryleap.ai/docs/errors.","isRequired":true,"uniqueKey":"error.code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","description":"What went wrong, written for a person. It can change; don't parse it.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"param":{"oneOf":[{"description":"For a `400`, the field at fault, such as `input.prompt`; otherwise null.","type":"string","isRequired":true,"uniqueKey":"error.param.oneOf.0","typeLabel":"string"},{"description":"For a `400`, the field at fault, such as `input.prompt`; otherwise null.","type":"null","isRequired":true,"uniqueKey":"error.param.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"error.param","typeLabel":"string | null"},"doc_url":{"oneOf":[{"description":"A page that explains this error, when there is one.","type":"string","isRequired":true,"uniqueKey":"error.doc_url.oneOf.0","typeLabel":"string"},{"description":"A page that explains this error, when there is one.","type":"null","isRequired":true,"uniqueKey":"error.doc_url.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"error.doc_url","typeLabel":"string | null"},"request_id":{"type":"string","description":"This request's ID, as in the `X-Request-Id` header. Include it when you contact support.","isRequired":true,"uniqueKey":"error.request_id","typeLabel":"string"},"moderation_reason":{"description":"Only on `photo_blocked`: why the photo check refused the photo, `minor` (someone in it may be under 18) or `nudity`.","type":"string","enum":["minor","nudity"],"uniqueKey":"error.moderation_reason","typeLabel":"enum\u003cstring>"}},"required":["type","code","message","param","doc_url","request_id"],"additionalProperties":false,"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"additionalProperties":false,"uniqueKey":"","typeLabel":"object"},"examples":{"authentication_required":{"title":"authentication_required","value":{"error":{"type":"authentication_error","code":"authentication_required","message":"Authentication is required.","param":null,"doc_url":null,"request_id":"req_8kQ2vX9mR4tL6nB1cW3yZ5aD"}}}},"exampleType":"examples"}},"exampleType":"examples"},"ca1bf7f6-a2e4-4700-955f-ab136b2c10a5":{"description":"`insufficient_credit`, `top_up_required`","headers":{"X-Request-Id":{"required":true,"description":"This request's ID. Include it when you contact support; it's also `request_id` in an error.","schema":{"type":"string","description":"This request's ID. Include it when you contact support; it's also `request_id` in an error.","example":"req_01J9Z8Q4N2K7T5V3X6Y8B0C1D2"}},"RateLimit-Limit":{"required":true,"description":"Requests allowed per window from your client.","schema":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Requests allowed per window from your client.","example":300}},"RateLimit-Remaining":{"required":true,"description":"Requests left in the current window.","schema":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Requests left in the current window.","example":299}},"RateLimit-Reset":{"required":true,"description":"Seconds until the window resets.","schema":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Seconds until the window resets.","example":42}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","rate_limit_error","authentication_error","permission_error","conflict_error","billing_error","api_error"],"description":"The kind of error. Branch on `type` and `code`, never on `message`.","isRequired":true,"uniqueKey":"error.type","typeLabel":"enum\u003cstring>"},"code":{"type":"string","enum":["invalid_parameter","invalid_request","conflicting_credentials","placeholder_in_path","method_not_allowed","payload_too_large","unsupported_media_type","ip_rate_limit_exceeded","authentication_required","missing_api_key","invalid_api_key","permission_denied","not_found","resource_not_found","gone","conflict","file_in_use","unpaid_failure_cap","photo_blocked","sexualized_real_person","rate_limit_exceeded","insufficient_credit","top_up_required","service_unavailable","internal_error"],"description":"A stable code for this error. Each one is explained at https://www.tryleap.ai/docs/errors.","isRequired":true,"uniqueKey":"error.code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","description":"What went wrong, written for a person. It can change; don't parse it.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"param":{"oneOf":[{"description":"For a `400`, the field at fault, such as `input.prompt`; otherwise null.","type":"string","isRequired":true,"uniqueKey":"error.param.oneOf.0","typeLabel":"string"},{"description":"For a `400`, the field at fault, such as `input.prompt`; otherwise null.","type":"null","isRequired":true,"uniqueKey":"error.param.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"error.param","typeLabel":"string | null"},"doc_url":{"oneOf":[{"description":"A page that explains this error, when there is one.","type":"string","isRequired":true,"uniqueKey":"error.doc_url.oneOf.0","typeLabel":"string"},{"description":"A page that explains this error, when there is one.","type":"null","isRequired":true,"uniqueKey":"error.doc_url.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"error.doc_url","typeLabel":"string | null"},"request_id":{"type":"string","description":"This request's ID, as in the `X-Request-Id` header. Include it when you contact support.","isRequired":true,"uniqueKey":"error.request_id","typeLabel":"string"},"moderation_reason":{"description":"Only on `photo_blocked`: why the photo check refused the photo, `minor` (someone in it may be under 18) or `nudity`.","type":"string","enum":["minor","nudity"],"uniqueKey":"error.moderation_reason","typeLabel":"enum\u003cstring>"}},"required":["type","code","message","param","doc_url","request_id"],"additionalProperties":false,"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"additionalProperties":false,"uniqueKey":"","typeLabel":"object"},"examples":{"insufficient_credit":{"title":"insufficient_credit","value":{"error":{"type":"billing_error","code":"insufficient_credit","message":"Not enough credit. Add credits to keep generating.","param":null,"doc_url":null,"request_id":"req_8kQ2vX9mR4tL6nB1cW3yZ5aD"}}},"top_up_required":{"title":"top_up_required","value":{"error":{"type":"billing_error","code":"top_up_required","message":"API keys run on paid credit, so this workspace's keys can start runs once it has topped up. Add $5 at https://app.tryleap.ai/go/api: the first top-up has no card fee, and your keys work as soon as it goes through.","param":null,"doc_url":null,"request_id":"req_8kQ2vX9mR4tL6nB1cW3yZ5aD"}}}},"exampleType":"examples"}},"exampleType":"examples"},"2cf70abc-4190-4003-987c-ce1478978008":{"description":"`permission_denied`","headers":{"X-Request-Id":{"required":true,"description":"This request's ID. Include it when you contact support; it's also `request_id` in an error.","schema":{"type":"string","description":"This request's ID. Include it when you contact support; it's also `request_id` in an error.","example":"req_01J9Z8Q4N2K7T5V3X6Y8B0C1D2"}},"RateLimit-Limit":{"required":true,"description":"Requests allowed per window from your client.","schema":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Requests allowed per window from your client.","example":300}},"RateLimit-Remaining":{"required":true,"description":"Requests left in the current window.","schema":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Requests left in the current window.","example":299}},"RateLimit-Reset":{"required":true,"description":"Seconds until the window resets.","schema":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Seconds until the window resets.","example":42}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","rate_limit_error","authentication_error","permission_error","conflict_error","billing_error","api_error"],"description":"The kind of error. Branch on `type` and `code`, never on `message`.","isRequired":true,"uniqueKey":"error.type","typeLabel":"enum\u003cstring>"},"code":{"type":"string","enum":["invalid_parameter","invalid_request","conflicting_credentials","placeholder_in_path","method_not_allowed","payload_too_large","unsupported_media_type","ip_rate_limit_exceeded","authentication_required","missing_api_key","invalid_api_key","permission_denied","not_found","resource_not_found","gone","conflict","file_in_use","unpaid_failure_cap","photo_blocked","sexualized_real_person","rate_limit_exceeded","insufficient_credit","top_up_required","service_unavailable","internal_error"],"description":"A stable code for this error. Each one is explained at https://www.tryleap.ai/docs/errors.","isRequired":true,"uniqueKey":"error.code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","description":"What went wrong, written for a person. It can change; don't parse it.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"param":{"oneOf":[{"description":"For a `400`, the field at fault, such as `input.prompt`; otherwise null.","type":"string","isRequired":true,"uniqueKey":"error.param.oneOf.0","typeLabel":"string"},{"description":"For a `400`, the field at fault, such as `input.prompt`; otherwise null.","type":"null","isRequired":true,"uniqueKey":"error.param.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"error.param","typeLabel":"string | null"},"doc_url":{"oneOf":[{"description":"A page that explains this error, when there is one.","type":"string","isRequired":true,"uniqueKey":"error.doc_url.oneOf.0","typeLabel":"string"},{"description":"A page that explains this error, when there is one.","type":"null","isRequired":true,"uniqueKey":"error.doc_url.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"error.doc_url","typeLabel":"string | null"},"request_id":{"type":"string","description":"This request's ID, as in the `X-Request-Id` header. Include it when you contact support.","isRequired":true,"uniqueKey":"error.request_id","typeLabel":"string"},"moderation_reason":{"description":"Only on `photo_blocked`: why the photo check refused the photo, `minor` (someone in it may be under 18) or `nudity`.","type":"string","enum":["minor","nudity"],"uniqueKey":"error.moderation_reason","typeLabel":"enum\u003cstring>"}},"required":["type","code","message","param","doc_url","request_id"],"additionalProperties":false,"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"additionalProperties":false,"uniqueKey":"","typeLabel":"object"},"examples":{"permission_denied":{"title":"permission_denied","value":{"error":{"type":"permission_error","code":"permission_denied","message":"Permission denied.","param":null,"doc_url":null,"request_id":"req_8kQ2vX9mR4tL6nB1cW3yZ5aD"}}}},"exampleType":"examples"}},"exampleType":"examples"},"1185608c-16ae-4232-a0ad-4ed1741d0552":{"description":"`conflict`, `unpaid_failure_cap`","headers":{"X-Request-Id":{"required":true,"description":"This request's ID. Include it when you contact support; it's also `request_id` in an error.","schema":{"type":"string","description":"This request's ID. Include it when you contact support; it's also `request_id` in an error.","example":"req_01J9Z8Q4N2K7T5V3X6Y8B0C1D2"}},"RateLimit-Limit":{"required":true,"description":"Requests allowed per window from your client.","schema":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Requests allowed per window from your client.","example":300}},"RateLimit-Remaining":{"required":true,"description":"Requests left in the current window.","schema":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Requests left in the current window.","example":299}},"RateLimit-Reset":{"required":true,"description":"Seconds until the window resets.","schema":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Seconds until the window resets.","example":42}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","rate_limit_error","authentication_error","permission_error","conflict_error","billing_error","api_error"],"description":"The kind of error. Branch on `type` and `code`, never on `message`.","isRequired":true,"uniqueKey":"error.type","typeLabel":"enum\u003cstring>"},"code":{"type":"string","enum":["invalid_parameter","invalid_request","conflicting_credentials","placeholder_in_path","method_not_allowed","payload_too_large","unsupported_media_type","ip_rate_limit_exceeded","authentication_required","missing_api_key","invalid_api_key","permission_denied","not_found","resource_not_found","gone","conflict","file_in_use","unpaid_failure_cap","photo_blocked","sexualized_real_person","rate_limit_exceeded","insufficient_credit","top_up_required","service_unavailable","internal_error"],"description":"A stable code for this error. Each one is explained at https://www.tryleap.ai/docs/errors.","isRequired":true,"uniqueKey":"error.code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","description":"What went wrong, written for a person. It can change; don't parse it.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"param":{"oneOf":[{"description":"For a `400`, the field at fault, such as `input.prompt`; otherwise null.","type":"string","isRequired":true,"uniqueKey":"error.param.oneOf.0","typeLabel":"string"},{"description":"For a `400`, the field at fault, such as `input.prompt`; otherwise null.","type":"null","isRequired":true,"uniqueKey":"error.param.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"error.param","typeLabel":"string | null"},"doc_url":{"oneOf":[{"description":"A page that explains this error, when there is one.","type":"string","isRequired":true,"uniqueKey":"error.doc_url.oneOf.0","typeLabel":"string"},{"description":"A page that explains this error, when there is one.","type":"null","isRequired":true,"uniqueKey":"error.doc_url.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"error.doc_url","typeLabel":"string | null"},"request_id":{"type":"string","description":"This request's ID, as in the `X-Request-Id` header. Include it when you contact support.","isRequired":true,"uniqueKey":"error.request_id","typeLabel":"string"},"moderation_reason":{"description":"Only on `photo_blocked`: why the photo check refused the photo, `minor` (someone in it may be under 18) or `nudity`.","type":"string","enum":["minor","nudity"],"uniqueKey":"error.moderation_reason","typeLabel":"enum\u003cstring>"}},"required":["type","code","message","param","doc_url","request_id"],"additionalProperties":false,"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"additionalProperties":false,"uniqueKey":"","typeLabel":"object"},"examples":{"conflict":{"title":"conflict","value":{"error":{"type":"conflict_error","code":"conflict","message":"The request conflicts with the current state.","param":null,"doc_url":null,"request_id":"req_8kQ2vX9mR4tL6nB1cW3yZ5aD"}}},"unpaid_failure_cap":{"title":"unpaid_failure_cap","value":{"error":{"type":"conflict_error","code":"unpaid_failure_cap","message":"6 video runs have ended without a charge, so video runs wait for your first top-up. Images still run.","param":null,"doc_url":null,"request_id":"req_8kQ2vX9mR4tL6nB1cW3yZ5aD"}}}},"exampleType":"examples"}},"exampleType":"examples"},"c1cfcaad-6898-4cc6-97da-f9a7c3990042":{"description":"`gone`","headers":{"X-Request-Id":{"required":true,"description":"This request's ID. Include it when you contact support; it's also `request_id` in an error.","schema":{"type":"string","description":"This request's ID. Include it when you contact support; it's also `request_id` in an error.","example":"req_01J9Z8Q4N2K7T5V3X6Y8B0C1D2"}},"RateLimit-Limit":{"required":true,"description":"Requests allowed per window from your client.","schema":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Requests allowed per window from your client.","example":300}},"RateLimit-Remaining":{"required":true,"description":"Requests left in the current window.","schema":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Requests left in the current window.","example":299}},"RateLimit-Reset":{"required":true,"description":"Seconds until the window resets.","schema":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Seconds until the window resets.","example":42}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","rate_limit_error","authentication_error","permission_error","conflict_error","billing_error","api_error"],"description":"The kind of error. Branch on `type` and `code`, never on `message`.","isRequired":true,"uniqueKey":"error.type","typeLabel":"enum\u003cstring>"},"code":{"type":"string","enum":["invalid_parameter","invalid_request","conflicting_credentials","placeholder_in_path","method_not_allowed","payload_too_large","unsupported_media_type","ip_rate_limit_exceeded","authentication_required","missing_api_key","invalid_api_key","permission_denied","not_found","resource_not_found","gone","conflict","file_in_use","unpaid_failure_cap","photo_blocked","sexualized_real_person","rate_limit_exceeded","insufficient_credit","top_up_required","service_unavailable","internal_error"],"description":"A stable code for this error. Each one is explained at https://www.tryleap.ai/docs/errors.","isRequired":true,"uniqueKey":"error.code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","description":"What went wrong, written for a person. It can change; don't parse it.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"param":{"oneOf":[{"description":"For a `400`, the field at fault, such as `input.prompt`; otherwise null.","type":"string","isRequired":true,"uniqueKey":"error.param.oneOf.0","typeLabel":"string"},{"description":"For a `400`, the field at fault, such as `input.prompt`; otherwise null.","type":"null","isRequired":true,"uniqueKey":"error.param.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"error.param","typeLabel":"string | null"},"doc_url":{"oneOf":[{"description":"A page that explains this error, when there is one.","type":"string","isRequired":true,"uniqueKey":"error.doc_url.oneOf.0","typeLabel":"string"},{"description":"A page that explains this error, when there is one.","type":"null","isRequired":true,"uniqueKey":"error.doc_url.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"error.doc_url","typeLabel":"string | null"},"request_id":{"type":"string","description":"This request's ID, as in the `X-Request-Id` header. Include it when you contact support.","isRequired":true,"uniqueKey":"error.request_id","typeLabel":"string"},"moderation_reason":{"description":"Only on `photo_blocked`: why the photo check refused the photo, `minor` (someone in it may be under 18) or `nudity`.","type":"string","enum":["minor","nudity"],"uniqueKey":"error.moderation_reason","typeLabel":"enum\u003cstring>"}},"required":["type","code","message","param","doc_url","request_id"],"additionalProperties":false,"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"additionalProperties":false,"uniqueKey":"","typeLabel":"object"},"examples":{"gone":{"title":"gone","value":{"error":{"type":"invalid_request_error","code":"gone","message":"That resource was retired.","param":null,"doc_url":null,"request_id":"req_8kQ2vX9mR4tL6nB1cW3yZ5aD"}}}},"exampleType":"examples"}},"exampleType":"examples"},"34f79fe0-b835-4c43-86d7-531272b57efc":{"description":"`photo_blocked`, `sexualized_real_person`","headers":{"X-Request-Id":{"required":true,"description":"This request's ID. Include it when you contact support; it's also `request_id` in an error.","schema":{"type":"string","description":"This request's ID. Include it when you contact support; it's also `request_id` in an error.","example":"req_01J9Z8Q4N2K7T5V3X6Y8B0C1D2"}},"RateLimit-Limit":{"required":true,"description":"Requests allowed per window from your client.","schema":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Requests allowed per window from your client.","example":300}},"RateLimit-Remaining":{"required":true,"description":"Requests left in the current window.","schema":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Requests left in the current window.","example":299}},"RateLimit-Reset":{"required":true,"description":"Seconds until the window resets.","schema":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Seconds until the window resets.","example":42}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","rate_limit_error","authentication_error","permission_error","conflict_error","billing_error","api_error"],"description":"The kind of error. Branch on `type` and `code`, never on `message`.","isRequired":true,"uniqueKey":"error.type","typeLabel":"enum\u003cstring>"},"code":{"type":"string","enum":["invalid_parameter","invalid_request","conflicting_credentials","placeholder_in_path","method_not_allowed","payload_too_large","unsupported_media_type","ip_rate_limit_exceeded","authentication_required","missing_api_key","invalid_api_key","permission_denied","not_found","resource_not_found","gone","conflict","file_in_use","unpaid_failure_cap","photo_blocked","sexualized_real_person","rate_limit_exceeded","insufficient_credit","top_up_required","service_unavailable","internal_error"],"description":"A stable code for this error. Each one is explained at https://www.tryleap.ai/docs/errors.","isRequired":true,"uniqueKey":"error.code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","description":"What went wrong, written for a person. It can change; don't parse it.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"param":{"oneOf":[{"description":"For a `400`, the field at fault, such as `input.prompt`; otherwise null.","type":"string","isRequired":true,"uniqueKey":"error.param.oneOf.0","typeLabel":"string"},{"description":"For a `400`, the field at fault, such as `input.prompt`; otherwise null.","type":"null","isRequired":true,"uniqueKey":"error.param.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"error.param","typeLabel":"string | null"},"doc_url":{"oneOf":[{"description":"A page that explains this error, when there is one.","type":"string","isRequired":true,"uniqueKey":"error.doc_url.oneOf.0","typeLabel":"string"},{"description":"A page that explains this error, when there is one.","type":"null","isRequired":true,"uniqueKey":"error.doc_url.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"error.doc_url","typeLabel":"string | null"},"request_id":{"type":"string","description":"This request's ID, as in the `X-Request-Id` header. Include it when you contact support.","isRequired":true,"uniqueKey":"error.request_id","typeLabel":"string"},"moderation_reason":{"description":"Only on `photo_blocked`: why the photo check refused the photo, `minor` (someone in it may be under 18) or `nudity`.","type":"string","enum":["minor","nudity"],"uniqueKey":"error.moderation_reason","typeLabel":"enum\u003cstring>"}},"required":["type","code","message","param","doc_url","request_id"],"additionalProperties":false,"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"additionalProperties":false,"uniqueKey":"","typeLabel":"object"},"examples":{"photo_blocked":{"title":"photo_blocked","value":{"error":{"type":"invalid_request_error","code":"photo_blocked","message":"We can't use this photo. Leap only works with photos of adults, and this one may show someone under 18. Nothing ran and nothing was charged.","param":"input.photo","doc_url":null,"request_id":"req_8kQ2vX9mR4tL6nB1cW3yZ5aD","moderation_reason":"minor"}}},"sexualized_real_person":{"title":"sexualized_real_person","value":{"error":{"type":"invalid_request_error","code":"sexualized_real_person","message":"Leap doesn't make sexual edits or videos of real people from their photos. Nothing ran and nothing was charged.","param":"input.prompt","doc_url":null,"request_id":"req_8kQ2vX9mR4tL6nB1cW3yZ5aD"}}}},"exampleType":"examples"}},"exampleType":"examples"},"a4c2fdf7-cace-4b9a-90f9-25fe3b02f833":{"description":"`rate_limit_exceeded`","headers":{"X-Request-Id":{"required":true,"description":"This request's ID. Include it when you contact support; it's also `request_id` in an error.","schema":{"type":"string","description":"This request's ID. Include it when you contact support; it's also `request_id` in an error.","example":"req_01J9Z8Q4N2K7T5V3X6Y8B0C1D2"}},"RateLimit-Limit":{"required":true,"description":"Requests allowed per window from your client.","schema":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Requests allowed per window from your client.","example":300}},"RateLimit-Remaining":{"required":true,"description":"Requests left in the current window.","schema":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Requests left in the current window.","example":299}},"RateLimit-Reset":{"required":true,"description":"Seconds until the window resets.","schema":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Seconds until the window resets.","example":42}},"Retry-After":{"required":true,"description":"Seconds to wait before you retry.","schema":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Seconds to wait before you retry.","example":42}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","rate_limit_error","authentication_error","permission_error","conflict_error","billing_error","api_error"],"description":"The kind of error. Branch on `type` and `code`, never on `message`.","isRequired":true,"uniqueKey":"error.type","typeLabel":"enum\u003cstring>"},"code":{"type":"string","enum":["invalid_parameter","invalid_request","conflicting_credentials","placeholder_in_path","method_not_allowed","payload_too_large","unsupported_media_type","ip_rate_limit_exceeded","authentication_required","missing_api_key","invalid_api_key","permission_denied","not_found","resource_not_found","gone","conflict","file_in_use","unpaid_failure_cap","photo_blocked","sexualized_real_person","rate_limit_exceeded","insufficient_credit","top_up_required","service_unavailable","internal_error"],"description":"A stable code for this error. Each one is explained at https://www.tryleap.ai/docs/errors.","isRequired":true,"uniqueKey":"error.code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","description":"What went wrong, written for a person. It can change; don't parse it.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"param":{"oneOf":[{"description":"For a `400`, the field at fault, such as `input.prompt`; otherwise null.","type":"string","isRequired":true,"uniqueKey":"error.param.oneOf.0","typeLabel":"string"},{"description":"For a `400`, the field at fault, such as `input.prompt`; otherwise null.","type":"null","isRequired":true,"uniqueKey":"error.param.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"error.param","typeLabel":"string | null"},"doc_url":{"oneOf":[{"description":"A page that explains this error, when there is one.","type":"string","isRequired":true,"uniqueKey":"error.doc_url.oneOf.0","typeLabel":"string"},{"description":"A page that explains this error, when there is one.","type":"null","isRequired":true,"uniqueKey":"error.doc_url.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"error.doc_url","typeLabel":"string | null"},"request_id":{"type":"string","description":"This request's ID, as in the `X-Request-Id` header. Include it when you contact support.","isRequired":true,"uniqueKey":"error.request_id","typeLabel":"string"},"moderation_reason":{"description":"Only on `photo_blocked`: why the photo check refused the photo, `minor` (someone in it may be under 18) or `nudity`.","type":"string","enum":["minor","nudity"],"uniqueKey":"error.moderation_reason","typeLabel":"enum\u003cstring>"}},"required":["type","code","message","param","doc_url","request_id"],"additionalProperties":false,"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"additionalProperties":false,"uniqueKey":"","typeLabel":"object"},"examples":{"rate_limit_exceeded":{"title":"rate_limit_exceeded","value":{"error":{"type":"rate_limit_error","code":"rate_limit_exceeded","message":"Too Many Requests","param":null,"doc_url":null,"request_id":"req_8kQ2vX9mR4tL6nB1cW3yZ5aD"}}}},"exampleType":"examples"}},"exampleType":"examples"},"9c21ad89-28c2-424d-9891-ec22946b996f":{"description":"`service_unavailable`","headers":{"X-Request-Id":{"required":true,"description":"This request's ID. Include it when you contact support; it's also `request_id` in an error.","schema":{"type":"string","description":"This request's ID. Include it when you contact support; it's also `request_id` in an error.","example":"req_01J9Z8Q4N2K7T5V3X6Y8B0C1D2"}},"RateLimit-Limit":{"required":true,"description":"Requests allowed per window from your client.","schema":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Requests allowed per window from your client.","example":300}},"RateLimit-Remaining":{"required":true,"description":"Requests left in the current window.","schema":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Requests left in the current window.","example":299}},"RateLimit-Reset":{"required":true,"description":"Seconds until the window resets.","schema":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Seconds until the window resets.","example":42}},"Retry-After":{"required":true,"description":"Seconds to wait before you retry.","schema":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Seconds to wait before you retry.","example":42}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","rate_limit_error","authentication_error","permission_error","conflict_error","billing_error","api_error"],"description":"The kind of error. Branch on `type` and `code`, never on `message`.","isRequired":true,"uniqueKey":"error.type","typeLabel":"enum\u003cstring>"},"code":{"type":"string","enum":["invalid_parameter","invalid_request","conflicting_credentials","placeholder_in_path","method_not_allowed","payload_too_large","unsupported_media_type","ip_rate_limit_exceeded","authentication_required","missing_api_key","invalid_api_key","permission_denied","not_found","resource_not_found","gone","conflict","file_in_use","unpaid_failure_cap","photo_blocked","sexualized_real_person","rate_limit_exceeded","insufficient_credit","top_up_required","service_unavailable","internal_error"],"description":"A stable code for this error. Each one is explained at https://www.tryleap.ai/docs/errors.","isRequired":true,"uniqueKey":"error.code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","description":"What went wrong, written for a person. It can change; don't parse it.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"param":{"oneOf":[{"description":"For a `400`, the field at fault, such as `input.prompt`; otherwise null.","type":"string","isRequired":true,"uniqueKey":"error.param.oneOf.0","typeLabel":"string"},{"description":"For a `400`, the field at fault, such as `input.prompt`; otherwise null.","type":"null","isRequired":true,"uniqueKey":"error.param.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"error.param","typeLabel":"string | null"},"doc_url":{"oneOf":[{"description":"A page that explains this error, when there is one.","type":"string","isRequired":true,"uniqueKey":"error.doc_url.oneOf.0","typeLabel":"string"},{"description":"A page that explains this error, when there is one.","type":"null","isRequired":true,"uniqueKey":"error.doc_url.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"error.doc_url","typeLabel":"string | null"},"request_id":{"type":"string","description":"This request's ID, as in the `X-Request-Id` header. Include it when you contact support.","isRequired":true,"uniqueKey":"error.request_id","typeLabel":"string"},"moderation_reason":{"description":"Only on `photo_blocked`: why the photo check refused the photo, `minor` (someone in it may be under 18) or `nudity`.","type":"string","enum":["minor","nudity"],"uniqueKey":"error.moderation_reason","typeLabel":"enum\u003cstring>"}},"required":["type","code","message","param","doc_url","request_id"],"additionalProperties":false,"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"additionalProperties":false,"uniqueKey":"","typeLabel":"object"},"examples":{"service_unavailable":{"title":"service_unavailable","value":{"error":{"type":"api_error","code":"service_unavailable","message":"Service unavailable.","param":null,"doc_url":null,"request_id":"req_8kQ2vX9mR4tL6nB1cW3yZ5aD"}}}},"exampleType":"examples"}},"exampleType":"examples"}},"security":{"8f394945-6e6a-438b-a713-b9b98ddec0d5":{"ApiKey":{"type":"apiKey","in":"header","name":"x-api-key","description":"Your workspace API key, `leap_...`. Create one at https://app.tryleap.ai/go/api, and keep it on your server.","scopes":[],"schemeName":"ApiKey"}},"f875416d-92de-4b7b-ae9f-7c93b205b653":{"Bearer":{"type":"http","scheme":"bearer","description":"The same API key as `Authorization: Bearer leap_...`, the way most HTTP clients and coding agents send one. Send one header or the other; two different keys are a `400`.","scopes":[],"schemeName":"Bearer"}}},"servers":{"f01f3dd6-cc2d-41e2-a009-e8c7b8d34abd":{"url":"https://api.tryleap.ai"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"apiKey","in":"header","name":"x-api-key","description":"Your workspace API key, `leap_...`. Create one at https://app.tryleap.ai/go/api, and keep it on your server.","scopes":[],"schemeName":"ApiKey"},"schema":{"title":"x-api-key","type":"string","description":"Your workspace API key, `leap_...`. Create one at https://app.tryleap.ai/go/api, and keep it on your server.","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"ApiKey","name":"x-api-key"}],"title":"ApiKey"},{"schemes":[{"scheme":{"type":"http","scheme":"bearer","description":"The same API key as `Authorization: Bearer leap_...`, the way most HTTP clients and coding agents send one. Send one header or the other; two different keys are a `400`.","scopes":[],"schemeName":"Bearer"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"The same API key as `Authorization: Bearer leap_...`, the way most HTTP clients and coding agents send one. Send one header or the other; two different keys are a `400`.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"Bearer","name":"Authorization"}],"title":"Bearer"}]},"originalFileLocation":"openapi.json"},"subdomain":"leap-0e8117eb","siteName":"Leap","title":"Create a batch - Leap","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"originalFileLocation":"api-reference/batches/create-a-batch.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Starts up to 50 generations in one request. They\u0026#x27;re priced and held together, so either all start or none do, and each then runs as its own generation with this batch\u0026#x27;s batch_id. Read each one with GET /v1/generations/{id}. One request that would sexualise a real person from a photo you uploaded refuses the whole batch with 422 sexualized_real_person. Needs an API key with the generations:write scope.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Leap\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/leap-0e8117eb/i0HgQd8phxMdNawg/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/docs/mintlify-assets/_mintlify/favicons/leap-0e8117eb/i0HgQd8phxMdNawg/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/leap-0e8117eb/i0HgQd8phxMdNawg/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/leap-0e8117eb/i0HgQd8phxMdNawg/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/leap-0e8117eb/i0HgQd8phxMdNawg/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/leap-0e8117eb/i0HgQd8phxMdNawg/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/leap-0e8117eb/i0HgQd8phxMdNawg/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/leap-0e8117eb/i0HgQd8phxMdNawg/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/leap-0e8117eb/i0HgQd8phxMdNawg/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Create a batch - Leap\">\u003cmeta data-mint-head property=\"og:description\" content=\"Starts up to 50 generations in one request. They\u0026#x27;re priced and held together, so either all start or none do, and each then runs as its own generation with this batch\u0026#x27;s batch_id. Read each one with GET /v1/generations/{id}. One request that would sexualise a real person from a photo you uploaded refuses the whole batch with 422 sexualized_real_person. Needs an API key with the generations:write scope.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Leap\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://www.tryleap.ai/docs/api-reference/batches/create-a-batch\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://leap-0e8117eb.mintlify.site/docs/_mintlify/api/og/v2?division=Batches\u0026amp;title=Create+a+batch\u0026amp;description=Starts+up+to+50+generations+in+one+request.+They%27re+priced+and+held+together%2C+so+either+all+start+or+none+do%2C+and+each+then+runs+as+its+own+generation+with+this\u0026amp;theme=04bb91a9020a32e360b3acb4\u0026amp;signature=f2ec38fede01a243c27e3c7c525d36be62671c7ce5429dc76a6a07afa937dd44\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Create a batch - Leap\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Starts up to 50 generations in one request. They\u0026#x27;re priced and held together, so either all start or none do, and each then runs as its own generation with this batch\u0026#x27;s batch_id. Read each one with GET /v1/generations/{id}. One request that would sexualise a real person from a photo you uploaded refuses the whole batch with 422 sexualized_real_person. Needs an API key with the generations:write scope.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://leap-0e8117eb.mintlify.site/docs/_mintlify/api/og/v2?division=Batches\u0026amp;title=Create+a+batch\u0026amp;description=Starts+up+to+50+generations+in+one+request.+They%27re+priced+and+held+together%2C+so+either+all+start+or+none+do%2C+and+each+then+runs+as+its+own+generation+with+this\u0026amp;theme=04bb91a9020a32e360b3acb4\u0026amp;signature=f2ec38fede01a243c27e3c7c525d36be62671c7ce5429dc76a6a07afa937dd44\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/docs/mintlify-assets/_mintlify/favicons/leap-0e8117eb/i0HgQd8phxMdNawg/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Leap\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#4F39F6\">\u003clink data-mint-head rel=\"canonical\" href=\"https://www.tryleap.ai/docs/api-reference/batches/create-a-batch\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/docs/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/api-reference/batches/create-a-batch.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://www.tryleap.ai/#organization\",\"name\":\"Leap\",\"url\":\"https://www.tryleap.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://www.tryleap.ai/icon-512.png\"}},{\"@type\":\"WebSite\",\"@id\":\"https://www.tryleap.ai/docs#website\",\"name\":\"Leap\",\"url\":\"https://www.tryleap.ai/docs\",\"publisher\":{\"@id\":\"https://www.tryleap.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://www.tryleap.ai/docs/api-reference/batches/create-a-batch#webpage\",\"url\":\"https://www.tryleap.ai/docs/api-reference/batches/create-a-batch\",\"name\":\"Create a batch\",\"description\":\"Starts up to 50 generations in one request. They're priced and held together, so either all start or none do, and each then runs as its own generation with this batch's batch_id. Read each one with GET /v1/generations/{id}. One request that would sexualise a real person from a photo you uploaded refuses the whole batch with 422 sexualized_real_person. Needs an API key with the generations:write scope.\",\"isPartOf\":{\"@id\":\"https://www.tryleap.ai/docs#website\"},\"breadcrumb\":{\"@id\":\"https://www.tryleap.ai/docs/api-reference/batches/create-a-batch#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://www.tryleap.ai/docs/api-reference/batches/create-a-batch#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Leap\",\"item\":\"https://www.tryleap.ai/docs\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create a batch\",\"item\":\"https://www.tryleap.ai/docs/api-reference/batches/create-a-batch\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://www.tryleap.ai/docs/api-reference/batches/create-a-batch#apireference\",\"headline\":\"Create a batch\",\"name\":\"Create a batch\",\"description\":\"Starts up to 50 generations in one request. They're priced and held together, so either all start or none do, and each then runs as its own generation with this batch's batch_id. Read each one with GET /v1/generations/{id}. One request that would sexualise a real person from a photo you uploaded refuses the whole batch with 422 sexualized_real_person. Needs an API key with the generations:write scope.\",\"url\":\"https://www.tryleap.ai/docs/api-reference/batches/create-a-batch\",\"mainEntityOfPage\":{\"@id\":\"https://www.tryleap.ai/docs/api-reference/batches/create-a-batch#webpage\"},\"publisher\":{\"@id\":\"https://www.tryleap.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://www.tryleap.ai/docs#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Leap\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Leap","nav":{"global":{"anchors":[{"anchor":"Model catalog","icon":"sparkles","href":"https://www.tryleap.ai/models"},{"anchor":"Connect an agent","icon":"plug","href":"https://app.tryleap.ai/go/connect?utm_source=tryleap\u0026utm_medium=docs\u0026utm_campaign=%2Fdocs\u0026utm_content=anchor"}]},"tabs":[{"tab":"Guides","pages":[{"title":"Guides","href":""}]},{"tab":"API reference","groups":[{"group":"Overview","icon":"book-open","pages":[{"title":"API reference","sidebarTitle":"Introduction","href":"/api-reference/introduction"}]},{"group":"Models","pages":[{"title":"List models","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/models","href":"/api-reference/models/list-models"},{"title":"Retrieve a model","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/models/{creator}/{name}","href":"/api-reference/models/retrieve-a-model"},{"title":"List models without a key","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/public/models","href":"/api-reference/models/list-models-without-a-key"},{"title":"Retrieve a model without a key","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/public/models/{creator}/{name}","href":"/api-reference/models/retrieve-a-model-without-a-key"}]},{"group":"Quotes","pages":[{"title":"Create a quote","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/quotes","href":"/api-reference/quotes/create-a-quote"}]},{"group":"Generations","pages":[{"title":"List generations","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/generations","href":"/api-reference/generations/list-generations"},{"title":"Create a generation","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/generations","href":"/api-reference/generations/create-a-generation"},{"title":"Retrieve a generation","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/generations/{id}","href":"/api-reference/generations/retrieve-a-generation"},{"title":"Cancel a generation","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/generations/{id}/cancel","href":"/api-reference/generations/cancel-a-generation"},{"title":"Keep an output as a file","description":"Turns an image output of a succeeded generation into a file of your workspace, so you can pass its ID to the next run without downloading and uploading it. Calling it again returns the same file. Other outputs answer `400`.\n\nNeeds an API key with the `generations:write` scope.","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/generations/{id}/outputs/{index}/file","href":"/api-reference/generations/keep-an-output-as-a-file"}]},{"group":"Batches","pages":[{"title":"Create a batch","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/batches","href":"/api-reference/batches/create-a-batch"},{"title":"Retrieve a batch","description":"A batch with every generation in it, each as `GET /v1/generations/{id}` would return it. Send `Prefer: wait=60` to hold the read until every run is final or 60 seconds pass. While any run isn't final, `Retry-After` says how many seconds to wait before the next read.\n\nNeeds an API key with the `generations:read` scope.","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/batches/{id}","href":"/api-reference/batches/retrieve-a-batch"}]},{"group":"Webhooks","pages":[{"title":"List webhook endpoints","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/webhook_endpoints","href":"/api-reference/webhooks/list-webhook-endpoints"},{"title":"Create a webhook endpoint","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/webhook_endpoints","href":"/api-reference/webhooks/create-a-webhook-endpoint"},{"title":"Retrieve a webhook endpoint","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/webhook_endpoints/{id}","href":"/api-reference/webhooks/retrieve-a-webhook-endpoint"},{"title":"Delete a webhook endpoint","deprecated":null,"version":null,"openapi":"/openapi.json delete /v1/webhook_endpoints/{id}","href":"/api-reference/webhooks/delete-a-webhook-endpoint"},{"title":"Update a webhook endpoint","deprecated":null,"version":null,"openapi":"/openapi.json patch /v1/webhook_endpoints/{id}","href":"/api-reference/webhooks/update-a-webhook-endpoint"},{"title":"Rotate a webhook secret","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/webhook_endpoints/{id}/rotate_secret","href":"/api-reference/webhooks/rotate-a-webhook-secret"},{"title":"Send a test event","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/webhook_endpoints/{id}/test","href":"/api-reference/webhooks/send-a-test-event"},{"title":"Retrieve the default webhook secret","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/webhooks/default/secret","href":"/api-reference/webhooks/retrieve-the-default-webhook-secret"}]},{"group":"Events","pages":[{"title":"List events","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/events","href":"/api-reference/events/list-events"},{"title":"Retrieve an event","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/events/{id}","href":"/api-reference/events/retrieve-an-event"},{"title":"List an event's deliveries","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/events/{id}/deliveries","href":"/api-reference/events/list-an-events-deliveries"},{"title":"Redeliver an event","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/events/{id}/redeliver","href":"/api-reference/events/redeliver-an-event"}]},{"group":"Files","pages":[{"title":"Upload an image","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/files","href":"/api-reference/files/upload-an-image"},{"title":"Retrieve a file","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/files/{id}","href":"/api-reference/files/retrieve-a-file"},{"title":"Delete a file","deprecated":null,"version":null,"openapi":"/openapi.json delete /v1/files/{id}","href":"/api-reference/files/delete-a-file"},{"title":"Start a video or sound upload","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/uploads","href":"/api-reference/files/start-a-video-or-sound-upload"},{"title":"Complete an upload","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/uploads/{id}/complete","href":"/api-reference/files/complete-an-upload"}]},{"group":"Characters","pages":[{"title":"List characters","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/characters","href":"/api-reference/characters/list-characters"},{"title":"Create a character","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/characters","href":"/api-reference/characters/create-a-character"},{"title":"Retrieve a character","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/characters/{id}","href":"/api-reference/characters/retrieve-a-character"},{"title":"Delete a character","deprecated":null,"version":null,"openapi":"/openapi.json delete /v1/characters/{id}","href":"/api-reference/characters/delete-a-character"},{"title":"Update a character","deprecated":null,"version":null,"openapi":"/openapi.json patch /v1/characters/{id}","href":"/api-reference/characters/update-a-character"}]},{"group":"Credits","pages":[{"title":"Retrieve your balance","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/credits","href":"/api-reference/credits/retrieve-your-balance"}]}]}]},"basePath":"","title":"Create a batch - Leap","buildId":"dpl_3pZeXn3XukjzFRgAX73A7GNDfRJ1","deploymentId":"dpl_3pZeXn3XukjzFRgAX73A7GNDfRJ1","dynamics":["c2aa737661","b0f84f53ff","a9bb46feb3","2b790eda92"],"chunks":["OpenApiReferenceProvider-CW3yP2DK.js","utils-BN0nty2W.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-C8_MydSG.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-Bsl5xDMQ.js","snippetPresets-DYv9OBej.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","conditional-requirements-CFM0id0Q.js","Page-CBlOSKZG.js","ApiExamples-9OnYPrVf.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-xr67xWGO.js","shallow-DO1aDdBF.js","getApiPlaygroundDisplay-o7cLzFL-.js","CodeSnippet-CGr2yOA8.js","CodeSnippets-CzBbqPNh.js","getPastedJson-dpi9sn5Y.js","icon-aIWHt8Pn.js","MethodPill-Bv2zLsGY.js","DuplicateIcon-DxFSz0J6.js","createIcon-uDNv6jwj.js","DynamicMarkdown-C91yhnNP.js","SectionHeading-DG_xjOLR.js","axios-vUo_bRtp.js","Markdown-B4M_Eo1P.js","clsx-DShopWo_.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-BX6wab7q.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-48h67xm_.js"]}