{"openapi":"3.0.0","info":{"title":"Film Fun Splice – Agent API","description":"API for agents and scripts to create productions, generate media (image, video, voice, music), edit assets, and manage credits. Authenticate with an agent API key (`Authorization: Bearer sk_…` or `x-api-key`) or an OAuth 2.1 access token. Public reads (pricing, templates) need no key. Errors use one typed envelope (`Error`). List routes page with `limit`/`offset`. Developer portal: https://splice.film.fun/developers","version":"1.0.0","x-api-version":"2026-10-01","contact":{"name":"Splice support","email":"support@film.fun","url":"https://splice.film.fun/developers"},"termsOfService":"https://www.film.fun/terms"},"externalDocs":{"description":"Developer portal","url":"https://splice.film.fun/developers"},"servers":[{"url":"https://splice.film.fun","description":"Splice API"}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]},{"OAuth2":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key","description":"Agent API key (or use Authorization: Bearer <key>)"},"BearerAuth":{"type":"http","scheme":"bearer","description":"An agent key (sk_…) or an OAuth access token."},"OAuth2":{"type":"oauth2","description":"OAuth 2.1 authorization code with PKCE (S256). Public clients register at /oauth/register. See /auth.md.","flows":{"authorizationCode":{"authorizationUrl":"https://splice.film.fun/oauth/authorize","tokenUrl":"https://splice.film.fun/oauth/token","refreshUrl":"https://splice.film.fun/oauth/token","scopes":{"splice:read":"Read productions, compositions, characters, models and the credit balance","splice:generate":"Generate and edit media (spends credits)"}}}}},"headers":{"Splice-Api-Version":{"description":"The agent API version (date).","schema":{"type":"string","example":"2026-10-01"}},"X-RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left in the window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"schemas":{"Error":{"type":"object","description":"Every non-2xx response. Match on error.code (stable snake_case), not on message.","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","example":"insufficient_credits"},"message":{"type":"string","example":"Not enough credits."},"details":{"description":"Structured detail: field errors, required scope, upstream status."}}}},"additionalProperties":true},"Pagination":{"type":"object","properties":{"limit":{"type":"integer","nullable":true},"offset":{"type":"integer"},"returned":{"type":"integer"},"total":{"type":"integer"},"has_more":{"type":"boolean"},"next_offset":{"type":"integer","nullable":true}}},"ModelPrice":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"generator":{"type":"string"},"generator_name":{"type":"string"},"cost_type":{"type":"string","enum":["fixed","time","token"]},"unit":{"type":"string","enum":["per_generation","per_second","usage"]},"base_credits":{"type":"number"},"per_second_credits":{"type":"number"},"variants":{"type":"object","properties":{"dimension":{"type":"string"},"options":{"type":"array","items":{"type":"object","properties":{"option":{"type":"string"},"base_credits":{"type":"number"},"per_second_credits":{"type":"number"}}}}}},"is_default":{"type":"boolean"},"restricted":{"type":"boolean"},"updated_at":{"type":"string","format":"date-time","nullable":true}}},"Pricing":{"type":"object","required":["generated_at","packs","models"],"properties":{"generated_at":{"type":"string","format":"date-time"},"models_status":{"type":"string","enum":["live","unavailable"]},"models_updated_at":{"type":"string","format":"date-time","nullable":true},"credit":{"type":"object","properties":{"definition":{"type":"string"},"usd_per_credit_starter":{"type":"number"},"expires":{"type":"boolean"}}},"signup_credits":{"type":"number"},"packs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"credits":{"type":"integer"},"price_usd":{"type":"number"},"credits_per_usd":{"type":"number"},"bonus_percent":{"type":"integer"}}}},"payment_methods":{"type":"array","items":{"type":"object","properties":{"method":{"type":"string"},"details":{"type":"string"}}}},"models":{"type":"array","items":{"$ref":"#/components/schemas/ModelPrice"}},"links":{"type":"object","additionalProperties":{"type":"string"}}}},"GenerationTemplate":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"slug":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"category":{"type":"string","nullable":true},"media_kind":{"type":"string"},"generator_tool_id":{"type":"string"},"tool_id":{"type":"string"},"prompt":{"type":"string","nullable":true},"payload":{"type":"object","description":"Ready-to-run generation settings (modelId, prompt, …)."},"preview_url":{"type":"string","nullable":true},"tags":{"type":"array","items":{"type":"string"}}}},"ProductionItemId":{"type":"object","properties":{"production_item_id":{"type":"string"}},"required":["production_item_id"]}}},"paths":{"/pricing.json":{"get":{"operationId":"getPricing","summary":"Public price list: credit packs and every model's live price","description":"No key needed. Credit packs are fixed; model prices are read live from the price list Splice charges from (cached up to an hour).","tags":["Public"],"security":[],"responses":{"200":{"description":"The price list","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Pricing"}}}}}}},"/api/public/generation-templates":{"get":{"operationId":"listPublicTemplates","summary":"Browse the public template library","description":"No key needed. Each template carries a ready-to-run generation payload.","tags":["Public"],"security":[],"parameters":[{"name":"q","in":"query","schema":{"type":"string"},"description":"Search text"},{"name":"media_kind","in":"query","schema":{"type":"string","enum":["image","video","music","voice","motion"]}},{"name":"category","in":"query","schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":24,"default":8}},{"name":"offset","in":"query","schema":{"type":"integer","minimum":0,"default":0}}],"responses":{"200":{"description":"Templates","content":{"application/json":{"schema":{"type":"object","properties":{"generation_templates":{"type":"array","items":{"$ref":"#/components/schemas/GenerationTemplate"}}}}}}}}}},"/api/public/generation-templates/{slug}":{"get":{"operationId":"getPublicTemplate","summary":"One public template by slug (or id)","tags":["Public"],"security":[],"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The template","content":{"application/json":{"schema":{"type":"object","properties":{"generation_template":{"$ref":"#/components/schemas/GenerationTemplate"}}}}}},"404":{"description":"Unknown or unpublished template","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/api/agents/session":{"get":{"summary":"Get or create session and default production","description":"Returns creation_id and production_id for the default production. Creates one if missing. Use before generating when no production_id is set on the key.","security":[{"ApiKeyAuth":[]}],"responses":{"200":{"description":"Session with default production","content":{"application/json":{"schema":{"type":"object","properties":{"creation_id":{"type":"string"},"production_id":{"type":"string"},"creation":{"type":"object"}}}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/agents/balance":{"get":{"summary":"Get credit balance","description":"Returns total, available, and allocated credits for the agent account.","security":[{"ApiKeyAuth":[]}],"responses":{"200":{"description":"Balance summary","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"balance":{"type":"object","properties":{"total":{"type":"number"},"available":{"type":"number"},"allocated_to_productions":{"type":"number"},"productions":{"type":"array","items":{"type":"object"}}}}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/agents/tools/generator-tools/image/models":{"get":{"summary":"List image generator models","description":"Returns available image generator models from Film Labs. Use model ids when calling POST /api/agents/generate/image.","security":[{"ApiKeyAuth":[]}],"responses":{"200":{"description":"List of image models","content":{"application/json":{"schema":{"type":"object","description":"Response shape from Film Labs tools/generator-tools/image/models"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Film Labs request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/agents/productions":{"get":{"summary":"List productions","description":"List the productions (creations) the caller can edit, newest first. Page with limit/offset; without limit every production is returned.","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200}},{"name":"offset","in":"query","schema":{"type":"integer","minimum":0,"default":0}},{"name":"series_id","in":"query","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"List of productions","content":{"application/json":{"schema":{"type":"object","properties":{"productions":{"type":"array","items":{"type":"object"}},"pagination":{"$ref":"#/components/schemas/Pagination"}}}}}},"400":{"description":"Invalid limit or offset","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Create production","description":"Create a new production. Optionally clone from production_id.","security":[{"ApiKeyAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string"},"description":{"type":"string"},"production_id":{"type":"string","description":"Source production id to clone"},"aspect_ratio":{"type":"string"},"content_rating":{"type":"string"},"genre":{"type":"array","items":{"type":"string"}},"tags":{"type":"array","items":{"type":"string"}}}}}}},"responses":{"201":{"description":"Production created","content":{"application/json":{"schema":{"type":"object","properties":{"creation":{"type":"object"},"production_id":{"type":"string"},"success":{"type":"boolean"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Film Labs create failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/agents/productions/{id}":{"get":{"summary":"Get production","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Production details","content":{"application/json":{"schema":{"type":"object","properties":{"creation":{"type":"object"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"summary":"Update production","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string"},"description":{"type":"string"},"status":{"type":"string"},"aspect_ratio":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"metadata":{"type":"object"}}}}}},"responses":{"200":{"description":"Updated creation","content":{"application/json":{"schema":{"type":"object","properties":{"creation":{"type":"object"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"summary":"Soft delete production","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Deleted","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/agents/productions/{id}/items":{"get":{"summary":"List production items","description":"List generated items (assets) in a production, newest first. Page with limit/offset.","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Splice creation id"},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200}},{"name":"offset","in":"query","schema":{"type":"integer","minimum":0,"default":0}}],"responses":{"200":{"description":"List of items","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object"}},"pagination":{"$ref":"#/components/schemas/Pagination"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/agents/productions/{id}/items/{itemId}":{"get":{"summary":"Get production item","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"itemId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Item details","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/agents/productions/{id}/media":{"post":{"summary":"Upload media to production","description":"Upload a file (multipart/form-data with `file` field). Id is Splice creation id.","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"},"name":{"type":"string"},"description":{"type":"string"},"type":{"type":"string","enum":["image","video","audio","pdf","text"]},"tags":{"type":"array","items":{"type":"string"}},"metadata":{"type":"object"}}}}}},"responses":{"201":{"description":"Uploaded","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Missing file or invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Production not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/agents/productions/{id}/studio/projects":{"get":{"summary":"List studio projects","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"List of projects","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Create studio project","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string"},"video_urls":{"type":"array","items":{"type":"string","format":"uri"}},"item_ids":{"type":"array","items":{"type":"string"}}}}}}},"responses":{"201":{"description":"Project created","content":{"application/json":{"schema":{"type":"object","properties":{"project_id":{"type":"string"},"review_url":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/agents/productions/{id}/studio/projects/{projectId}":{"get":{"summary":"Get studio project","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Project details","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/agents/generate/image":{"post":{"summary":"Generate image","description":"Text-to-image (and optional reference/style). Uses default production if production_id omitted.","security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["prompt"],"properties":{"production_id":{"type":"string"},"prompt":{"type":"string"},"modelId":{"type":"string"},"model":{"type":"string"},"width":{"type":"number"},"height":{"type":"number"},"negativePrompt":{"type":"string"},"referenceImage":{"type":"string"},"referenceImages":{"type":"array","items":{"type":"string"}},"styleImage":{"type":"string"},"characterReference":{"type":"string"},"seed":{"type":"number"},"steps":{"type":"number"},"cfgScale":{"type":"number"},"aspectRatio":{"type":"string"},"aspect_ratio":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"production_item_metadata":{"type":"object"},"parameters":{"type":"object"}}}}}},"responses":{"201":{"description":"Generated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductionItemId"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Production not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Generate failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/agents/generate/video":{"post":{"summary":"Generate video","description":"Text-to-video. Uses default production if production_id omitted.","security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["prompt"],"properties":{"production_id":{"type":"string"},"prompt":{"type":"string"},"modelId":{"type":"string"},"model":{"type":"string"},"parameters":{"type":"object"}}}}}},"responses":{"201":{"description":"Generated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductionItemId"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Production not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Generate failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/agents/generate/voice":{"post":{"summary":"Generate voice","description":"Text-to-speech. Uses default production if production_id omitted.","security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["text"],"properties":{"production_id":{"type":"string"},"text":{"type":"string"},"modelId":{"type":"string"},"parameters":{"type":"object"}}}}}},"responses":{"201":{"description":"Generated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductionItemId"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Production not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Generate failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/agents/generate/music":{"post":{"summary":"Generate music","description":"Generate music. Either prompt or lyrics is required.","security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"production_id":{"type":"string"},"prompt":{"type":"string"},"lyrics":{"type":"string"},"modelId":{"type":"string"},"model":{"type":"string"},"parameters":{"type":"object"}}}}}},"responses":{"201":{"description":"Generated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductionItemId"}}}},"400":{"description":"Validation failed (need prompt or lyrics)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Production not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Generate failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/agents/generate/video-animate":{"post":{"summary":"Animate image to video","description":"Image-to-video. Requires input_url (image URL) and prompt.","security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["input_url","prompt"],"properties":{"production_id":{"type":"string"},"input_url":{"type":"string","format":"uri"},"image":{"type":"string","format":"uri"},"prompt":{"type":"string"},"modelId":{"type":"string"},"parameters":{"type":"object"}}}}}},"responses":{"201":{"description":"Generated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductionItemId"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Production not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Generate failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/agents/edit/image":{"post":{"summary":"Edit image","description":"Image-to-image edit. Requires input_url (image URL) and prompt.","security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["input_url","prompt"],"properties":{"production_id":{"type":"string"},"input_url":{"type":"string","format":"uri"},"prompt":{"type":"string"},"modelId":{"type":"string"},"parameters":{"type":"object"}}}}}},"responses":{"201":{"description":"Generated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductionItemId"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Production not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Edit failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/agents/edit/image-upscale":{"post":{"summary":"Upscale image","description":"Upscale an image. Requires input_url. Optional upscale_factor: 2x, 4x, 6x.","security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["input_url"],"properties":{"production_id":{"type":"string"},"input_url":{"type":"string","format":"uri"},"upscale_factor":{"type":"string","enum":["2x","4x","6x"]},"parameters":{"type":"object"}}}}}},"responses":{"201":{"description":"Generated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductionItemId"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Production not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Upscale failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/agents/edit/media-merge":{"post":{"summary":"Merge media","description":"Merge multiple video/audio URLs into one. Requires input_urls array.","security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["input_urls"],"properties":{"production_id":{"type":"string"},"input_urls":{"type":"array","items":{"type":"string","format":"uri"},"minItems":1},"parameters":{"type":"object"}}}}}},"responses":{"201":{"description":"Generated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductionItemId"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Production not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Merge failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/agents/credits/transfer":{"post":{"summary":"Transfer credits","description":"Move credits to or from a production. production_id is Film Labs production id (or Splice creation id).","security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["production_id","amount","direction"],"properties":{"production_id":{"type":"string"},"amount":{"type":"number","minimum":0.01},"direction":{"type":"string","enum":["to_production","from_production"]},"description":{"type":"string"}}}}}},"responses":{"200":{"description":"Transfer result","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Production not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}