[{"data":1,"prerenderedAt":489,"buildId":490},["ShallowReactive",2],{"blog:article:openapi-client-ai-generation-api":3,"catalog":149},{"article":4,"related":126,"studioPath":148},{"slug":5,"path":6,"title":7,"description":8,"category":9,"categoryLabel":10,"date":11,"updated":11,"readingMinutes":12,"models":13,"featured":15,"primaryKeyword":16,"keywords":17,"words":29,"toc":30,"blocks":50,"faq":120},"openapi-client-ai-generation-api","\u002Fblog\u002Fopenapi-client-ai-generation-api","OpenAPI Client Generator for an Image and Video API","Point an OpenAPI client generator at one spec and get a typed client for image and video generation in TypeScript, Python or Java, kept in sync.","guides","Guides","2026-11-28",5,[14],"seedance-2-5",false,"openapi client generator",[18,19,20,21,22,23,24,25,26,27,28],"openapi generator","openapi generator typescript","openapi generator python","openapi generator cli","openapi generator tool","what is openapi generator","openapi generator github","openapi generator spring boot","openapi generator python fastapi","openapi typescript client","openapi-fetch",1151,[31,35,38,41,44,47],{"id":32,"text":33,"level":34},"where-the-spec-lives","Where the spec lives",2,{"id":36,"text":37,"level":34},"typescript-client-openapi-typescript-and-openapi-fetch","TypeScript client: openapi-typescript and openapi-fetch",{"id":39,"text":40,"level":34},"python-client-openapi-python-client","Python client: openapi-python-client",{"id":42,"text":43,"level":34},"openapi-generator-for-java-spring-boot-and-more","OpenAPI Generator for Java, Spring Boot and more",{"id":45,"text":46,"level":34},"keeping-model-options-current","Keeping model options current",{"id":48,"text":49,"level":34},"faq","FAQ",[51,54,58,60,62,64,68,70,72,74,76,78,82,84,86,88,91,93,96,98],{"type":52,"html":53},"html","\u003Cp>An OpenAPI client generator reads an API&#39;s spec and writes the client for you: typed request bodies, typed answers and one function per endpoint. Frameport publishes its whole API as one OpenAPI 3.1 document at \u003Ca href=\"\u002Fopenapi.json\">\u002Fopenapi.json\u003C\u002Fa>, so a couple of commands give you a typed client for image and video generation in TypeScript, Python or Java, and a misspelled field fails in your editor instead of in production.\u003C\u002Fp>\n\u003Cp>This guide uses three generators we ran against that spec: openapi-typescript with openapi-fetch, openapi-python-client, and OpenAPI Generator. Each sample prices a \u003Ca href=\"\u002Fmodels\u002Fseedance-2-5\">Seedance 2.5\u003C\u002Fa> clip, submits it under a cost cap and reads it until it settles. The last part shows what to keep out of generated code: model ids and their options.\u003C\u002Fp>\n\u003Ch2 id=\"where-the-spec-lives\">Where the spec lives\u003C\u002Fh2>\n\u003Cp>The document is served at \u003Ccode>https:\u002F\u002Fframeport.ai\u002Fopenapi.json\u003C\u002Fcode>, built from the same source as the \u003Ca href=\"\u002Fdocs\">API reference\u003C\u002Fa> and updated with each release. It needs no key to download:\u003C\u002Fp>",{"type":55,"lang":56,"code":57},"code","curl","curl -O https:\u002F\u002Fframeport.ai\u002Fopenapi.json",{"type":52,"html":59},"\u003Cp>It describes every endpoint under \u003Ccode>\u002Fv1\u003C\u002Fcode>, grouped by tag (Images, Videos, Clip edits, Uploads, Generations, Files, Models, Account), with an \u003Ccode>operationId\u003C\u002Fcode> for each, such as \u003Ccode>createVideoGeneration\u003C\u002Fcode> or \u003Ccode>quoteGeneration\u003C\u002Fcode>. It also declares the Bearer key scheme, the \u003Ccode>Idempotency-Key\u003C\u002Fcode> header and the error body every failure shares. The \u003Ca href=\"\u002Fdocs\u002Fopenapi\">OpenAPI page\u003C\u002Fa> lists other uses: import it into Postman, Insomnia or Bruno, or hand it to a coding agent along with \u003Ca href=\"\u002Fllms.txt\">llms.txt\u003C\u002Fa>.\u003C\u002Fp>\n\u003Cp>What the spec leaves out is deliberate:\u003C\u002Fp>\n\u003Cdiv class=\"blog-table box\">\u003Ctable class=\"tbl\">\u003Cthead>\u003Ctr>\u003Cth scope=\"col\">In the spec\u003C\u002Fth>\u003Cth scope=\"col\">Read at run time from \u003Ccode>GET \u002Fv1\u002Fmodels\u003C\u002Fcode>\u003C\u002Fth>\u003C\u002Ftr>\u003C\u002Fthead>\u003Ctbody>\u003Ctr>\u003Ctd>Paths, methods and operation ids\u003C\u002Ftd>\u003Ctd>Which model ids exist\u003C\u002Ftd>\u003C\u002Ftr>\n\u003Ctr>\u003Ctd>Request bodies, answers and error bodies\u003C\u002Ftd>\u003Ctd>Each model&#39;s prices\u003C\u002Ftd>\u003C\u002Ftr>\n\u003Ctr>\u003Ctd>The key scheme and \u003Ccode>Idempotency-Key\u003C\u002Fcode>\u003C\u002Ftd>\u003Ctd>Resolutions, durations and aspect ratios per model\u003C\u002Ftd>\u003C\u002Ftr>\n\u003Ctr>\u003Ctd>Statuses, types and other fixed enums\u003C\u002Ftd>\u003Ctd>Clip limits of each editor\u003C\u002Ftd>\u003C\u002Ftr>\u003C\u002Ftbody>\u003C\u002Ftable>\u003C\u002Fdiv>\n\u003Cp>\u003Ccode>model\u003C\u002Fcode> is a plain string in every request schema, and \u003Ccode>options\u003C\u002Fcode> is an open object, because the catalog changes far more often than the endpoints. A client generated today keeps compiling when a model is added tomorrow.\u003C\u002Fp>\n\u003Ch2 id=\"typescript-client-openapi-typescript-and-openapi-fetch\">TypeScript client: openapi-typescript and openapi-fetch\u003C\u002Fh2>\n\u003Cp>openapi-typescript turns the spec into a declaration file with no runtime code at all, and openapi-fetch is a thin typed wrapper over \u003Ccode>fetch\u003C\u002Fcode> that reads those declarations. Together they check every path, parameter and body at compile time:\u003C\u002Fp>",{"type":55,"lang":56,"code":61},"npm install openapi-fetch\nnpm install --save-dev openapi-typescript typescript@5\nnpx openapi-typescript https:\u002F\u002Fframeport.ai\u002Fopenapi.json -o frameport.d.ts",{"type":52,"html":63},"\u003Cp>openapi-typescript 7 runs on TypeScript 5. In our test it stopped with an error when only a newer TypeScript was installed, so pin version 5 next to it, as above. Then, in a project whose \u003Ccode>package.json\u003C\u002Fcode> has \u003Ccode>&quot;type&quot;: &quot;module&quot;\u003C\u002Fcode>:\u003C\u002Fp>",{"type":55,"lang":65,"code":66,"title":67},"node","import createClient from 'openapi-fetch'\nimport type { components, paths } from '.\u002Fframeport.js' \u002F\u002F the frameport.d.ts generated above\n\ntype Generation = components['schemas']['Generation']\n\nconst api = createClient\u003Cpaths>({\n  baseUrl: 'https:\u002F\u002Fframeport.ai',\n  headers: { Authorization: `Bearer ${process.env.FRAMEPORT_API_KEY}` },\n})\n\nconst body = {\n  model: 'seedance-2-5',\n  prompt: 'A lighthouse keeper climbs the spiral stairs at dusk, lantern swinging, wind howling outside',\n  duration: 5,\n  resolution: '720p',\n  aspect_ratio: '9:16',\n} as const\n\n\u002F\u002F Free: the price, and whether the balance covers it\nconst quote = await api.POST('\u002Fv1\u002Fgenerations\u002Fquote', { body })\nif (quote.error) throw new Error(quote.error.error.message)\nconsole.log('price', quote.data.price_usd, 'covered', quote.data.enough_balance)\n\nconst submitted = await api.POST('\u002Fv1\u002Fvideos\u002Fgenerations', {\n  params: { header: { 'Idempotency-Key': 'lighthouse-stairs-1' } },\n  body: { ...body, max_cost_usd: quote.data.reserved_usd },\n})\nif (submitted.error) throw new Error(`${submitted.error.error.code}: ${submitted.error.error.message}`)\n\nlet gen: Generation = submitted.data\nwhile (gen.status === 'queued' || gen.status === 'running') {\n  await new Promise(resolve => setTimeout(resolve, 5000))\n  const read = await api.GET('\u002Fv1\u002Fgenerations\u002F{id}', { params: { path: { id: gen.id } } })\n  if (read.error) throw new Error(read.error.error.message)\n  gen = read.data\n}\nif (gen.error) throw new Error(`failed, nothing charged: ${gen.error.message}`)\nconsole.log(gen.outputs[0]?.url, 'charged', gen.cost_usd)","clip.ts",{"type":52,"html":69},"\u003Cp>Recent Node versions run a \u003Ccode>.ts\u003C\u002Fcode> file like this one directly; on an older one, use \u003Ccode>npx tsx clip.ts\u003C\u002Fcode>. Every answer comes back as \u003Ccode>{ data, error }\u003C\u002Fcode>: \u003Ccode>error\u003C\u002Fcode> is typed as the shared error body, so \u003Ccode>error.error.code\u003C\u002Fcode> autocompletes, and \u003Ccode>data\u003C\u002Fcode> is the \u003Ccode>Generation\u003C\u002Fcode> schema. A wrong path, a missing \u003Ccode>prompt\u003C\u002Fcode> or an \u003Ccode>aspect_ratio\u003C\u002Fcode> the API never takes is a compile error.\u003C\u002Fp>",{"type":71,"model":14},"cta",{"type":52,"html":73},"\u003Ch2 id=\"python-client-openapi-python-client\">Python client: openapi-python-client\u003C\u002Fh2>\n\u003Cp>openapi-python-client writes a whole installable package, with a function per operation and a class per schema:\u003C\u002Fp>",{"type":55,"lang":56,"code":75},"uvx openapi-python-client generate --url https:\u002F\u002Fframeport.ai\u002Fopenapi.json\npip install .\u002Fframeport-api-client",{"type":52,"html":77},"\u003Cp>The project is named after the spec&#39;s title, here \u003Ccode>frameport-api-client\u003C\u002Fcode>, with the package \u003Ccode>frameport_api_client\u003C\u002Fcode>. Three details save time. It skips \u003Ccode>POST \u002Fv1\u002Fuploads\u003C\u002Fcode> with a warning, because that endpoint takes the raw file rather than JSON: send uploads with \u003Ccode>requests\u003C\u002Fcode> or httpx, as the \u003Ca href=\"\u002Fblog\u002Fupload-files-to-ai-generation-api\">guide to sending your own files\u003C\u002Fa> shows. Enum values that are not valid Python names get generated names (the aspect ratio \u003Ccode>&quot;16:9&quot;\u003C\u002Fcode> becomes a member like \u003Ccode>VALUE_0\u003C\u002Fcode>), so build bodies with \u003Ccode>from_dict\u003C\u002Fcode> and plain strings. And the package declares its own Python floor in \u003Ccode>pyproject.toml\u003C\u002Fcode>, 3.11 with the release we used.\u003C\u002Fp>",{"type":55,"lang":79,"code":80,"title":81},"python","import os\nimport time\n\nfrom frameport_api_client import AuthenticatedClient\nfrom frameport_api_client.api.generations import get_generation, quote_generation\nfrom frameport_api_client.api.videos import create_video_generation\nfrom frameport_api_client.models import CreateVideoGenerationBody, Error, QuoteGenerationBody\n\nclient = AuthenticatedClient(base_url=\"https:\u002F\u002Fframeport.ai\", token=os.environ[\"FRAMEPORT_API_KEY\"])\nclip = {\"model\": \"seedance-2-5\", \"duration\": 5, \"resolution\": \"720p\", \"aspect_ratio\": \"9:16\"}\n\nquote = quote_generation.sync(client=client, body=QuoteGenerationBody.from_dict(clip))\nif isinstance(quote, Error):\n    raise SystemExit(quote.error.message)\nprint(\"price:\", quote.price_usd, \"covered:\", quote.enough_balance)\n\ngen = create_video_generation.sync(\n    client=client,\n    idempotency_key=\"lighthouse-stairs-1\",\n    body=CreateVideoGenerationBody.from_dict({\n        **clip,\n        \"prompt\": \"A lighthouse keeper climbs the spiral stairs at dusk, lantern swinging, wind howling outside\",\n        \"max_cost_usd\": quote.reserved_usd,\n    }),\n)\nif isinstance(gen, Error):\n    raise SystemExit(f\"{gen.error.code}: {gen.error.message}\")\n\nwhile gen.status in (\"queued\", \"running\"):\n    time.sleep(5)\n    gen = get_generation.sync(gen.id, client=client)\nif gen.error:\n    raise SystemExit(f\"Failed, nothing charged: {gen.error.message}\")\nprint(gen.outputs[0].url, \"charged\", gen.cost_usd)","clip.py",{"type":52,"html":83},"\u003Cp>A documented error status comes back as the \u003Ccode>Error\u003C\u002Fcode> model rather than an exception, hence the \u003Ccode>isinstance\u003C\u002Fcode> checks. Each function also has an \u003Ccode>asyncio\u003C\u002Fcode> twin for async code. For the same flow with plain \u003Ccode>requests\u003C\u002Fcode> and no generated code, see the \u003Ca href=\"\u002Fblog\u002Fai-video-generation-api-python\">AI video generation API in Python\u003C\u002Fa>.\u003C\u002Fp>\n\u003Ch2 id=\"openapi-generator-for-java-spring-boot-and-more\">OpenAPI Generator for Java, Spring Boot and more\u003C\u002Fh2>\n\u003Cp>OpenAPI Generator is the long-standing open-source tool, maintained on GitHub by the OpenAPITools project, that writes clients for many languages from one spec. Its npm wrapper downloads the generator and needs Java on the machine:\u003C\u002Fp>",{"type":55,"lang":56,"code":85},"npx @openapitools\u002Fopenapi-generator-cli generate -i https:\u002F\u002Fframeport.ai\u002Fopenapi.json -g python -o frameport-py\nnpx @openapitools\u002Fopenapi-generator-cli generate -i https:\u002F\u002Fframeport.ai\u002Fopenapi.json -g typescript-fetch -o frameport-ts\nnpx @openapitools\u002Fopenapi-generator-cli generate -i https:\u002F\u002Fframeport.ai\u002Fopenapi.json -g java --library restclient -o frameport-java",{"type":52,"html":87},"\u003Cp>What we saw with each:\u003C\u002Fp>\n\u003Cdiv class=\"blog-table box blog-table-wide\">\u003Ctable class=\"tbl\">\u003Cthead>\u003Ctr>\u003Cth scope=\"col\">Target\u003C\u002Fth>\u003Cth scope=\"col\">What you get\u003C\u002Fth>\u003Cth scope=\"col\">Note\u003C\u002Fth>\u003C\u002Ftr>\u003C\u002Fthead>\u003Ctbody>\u003Ctr>\u003Ctd>\u003Ccode>python\u003C\u002Fcode>\u003C\u002Ftd>\u003Ctd>One API class per tag (\u003Ccode>VideosApi\u003C\u002Fcode>, \u003Ccode>GenerationsApi\u003C\u002Fcode>…), with methods like \u003Ccode>create_video_generation\u003C\u002Fcode>\u003C\u002Ftd>\u003Ctd>Takes the body as a model and \u003Ccode>idempotency_key\u003C\u002Fcode> as a keyword\u003C\u002Ftd>\u003C\u002Ftr>\n\u003Ctr>\u003Ctd>\u003Ccode>typescript-fetch\u003C\u002Fcode>\u003C\u002Ftd>\u003Ctd>Classes per tag over \u003Ccode>fetch\u003C\u002Fcode>, with runtime models\u003C\u002Ftd>\u003Ctd>The \u003Ccode>Error\u003C\u002Fcode> schema is renamed \u003Ccode>ModelError\u003C\u002Fcode>\u003C\u002Ftd>\u003C\u002Ftr>\n\u003Ctr>\u003Ctd>\u003Ccode>java\u003C\u002Fcode>\u003C\u002Ftd>\u003Ctd>\u003Ccode>VideosApi.createVideoGeneration(request, idempotencyKey)\u003C\u002Fcode>\u003C\u002Ftd>\u003Ctd>\u003Ccode>--library restclient\u003C\u002Fcode>, \u003Ccode>webclient\u003C\u002Fcode> or \u003Ccode>resttemplate\u003C\u002Fcode> builds on Spring&#39;s HTTP clients\u003C\u002Ftd>\u003C\u002Ftr>\u003C\u002Ftbody>\u003C\u002Ftable>\u003C\u002Fdiv>\n\u003Cp>Each run warns that OpenAPI 3.1 support is still in beta; with this spec, all three finished without errors. The \u003Ccode>spring\u003C\u002Fcode> generator is a different thing: it writes server stubs for an API you host, not a client for one you call.\u003C\u002Fp>\n\u003Ch2 id=\"keeping-model-options-current\">Keeping model options current\u003C\u002Fh2>\n\u003Cp>Generated code covers the endpoints. The catalog lives at run time: \u003Ccode>GET \u002Fv1\u002Fmodels\u003C\u002Fcode> lists every model with its prices and \u003Ccode>options\u003C\u002Fcode>, and \u003Ccode>GET \u002Fv1\u002Fmodels\u002F{id}\u003C\u002Fcode> returns one, both without a key (\u003Ca href=\"\u002Fdocs\u002Fmodels\">models\u003C\u002Fa>). Since \u003Ccode>options\u003C\u002Fcode> is an open object in the spec, name the fields your code relies on and check a request against the live values, for instance to build a form or to fail early in a batch:\u003C\u002Fp>",{"type":55,"lang":65,"code":89,"title":90},"import createClient from 'openapi-fetch'\nimport type { paths } from '.\u002Fframeport.js'\n\n\u002F\u002F options is an open object in the spec: declare the fields you read\ninterface VideoOptions {\n  resolutions: string[]\n  durations: { min: number, max: number, step: number }\n  aspect_ratios: string[]\n}\n\nconst api = createClient\u003Cpaths>({ baseUrl: 'https:\u002F\u002Fframeport.ai' })\n\nexport async function checkClip(model: string, duration: number, resolution: string, aspectRatio: string) {\n  const { data, error } = await api.GET('\u002Fv1\u002Fmodels\u002F{id}', { params: { path: { id: model } } })\n  if (error) throw new Error(error.error.message)\n  const options = data.options as unknown as VideoOptions\n  const { min, max, step } = options.durations\n  const problems: string[] = []\n  if (!options.resolutions.includes(resolution)) problems.push(`resolution: one of ${options.resolutions.join(', ')}`)\n  if (duration \u003C min || duration > max || (duration - min) % step !== 0) problems.push(`duration: ${min} to ${max} s, in steps of ${step}`)\n  if (!options.aspect_ratios.includes(aspectRatio)) problems.push(`aspect_ratio: one of ${options.aspect_ratios.join(', ')}`)\n  return problems\n}\n\nconsole.log(await checkClip('seedance-2-5', 5, '720p', '9:16')) \u002F\u002F [] when the clip fits","options.ts",{"type":52,"html":92},"\u003Cp>The server applies the same rules anyway: a value a model does not take is refused with \u003Ccode>400 invalid_request\u003C\u002Fcode> before anything is held, and the message lists what the model takes.\u003C\u002Fp>\n\u003Cp>The endpoints change rarely, and the \u003Ca href=\"\u002Fchangelog\">changelog\u003C\u002Fa> announces new fields. To catch a change without reading it, regenerate in CI and fail when the output moves:\u003C\u002Fp>",{"type":55,"lang":56,"code":94,"title":95},"npx openapi-typescript https:\u002F\u002Fframeport.ai\u002Fopenapi.json -o src\u002Fframeport.d.ts\ngit diff --exit-code src\u002Fframeport.d.ts","CI: fail when the spec changed",{"type":52,"html":97},"\u003Cp>For two small apps built on the same endpoints, see the \u003Ca href=\"\u002Fblog\u002Fdiscord-bot-ai-image-generation\">Discord bot\u003C\u002Fa> and \u003Ca href=\"\u002Fblog\u002Ftelegram-bot-ai-video\">Telegram bot\u003C\u002Fa> guides.\u003C\u002Fp>",{"type":48,"id":48,"title":49,"items":99},[100,104,108,112,116],{"q":101,"html":102,"text":103},"What is OpenAPI Generator?","\u003Cp>An open-source project, maintained on GitHub by OpenAPITools, that turns an OpenAPI document into client libraries, server stubs and documentation for many languages. You run it from its CLI, its npm wrapper (which needs Java) or Docker, with \u003Ccode>-g\u003C\u002Fcode> naming the target.\u003C\u002Fp>","An open-source project, maintained on GitHub by OpenAPITools, that turns an OpenAPI document into client libraries, server stubs and documentation for many languages. You run it from its CLI, its npm wrapper (which needs Java) or Docker, with -g naming the target.",{"q":105,"html":106,"text":107},"Which OpenAPI client generator is best for TypeScript?","\u003Cp>For a small footprint, openapi-typescript with openapi-fetch: types only, a thin wrapper over \u003Ccode>fetch\u003C\u002Fcode>, and nothing to regenerate at run time. OpenAPI Generator&#39;s \u003Ccode>typescript-fetch\u003C\u002Fcode> target writes classes and runtime models instead, which some teams prefer.\u003C\u002Fp>","For a small footprint, openapi-typescript with openapi-fetch: types only, a thin wrapper over fetch, and nothing to regenerate at run time. OpenAPI Generator's typescript-fetch target writes classes and runtime models instead, which some teams prefer.",{"q":109,"html":110,"text":111},"Can I generate a Spring Boot client from an OpenAPI spec?","\u003Cp>Yes: \u003Ccode>-g java\u003C\u002Fcode> with \u003Ccode>--library restclient\u003C\u002Fcode>, \u003Ccode>webclient\u003C\u002Fcode> or \u003Ccode>resttemplate\u003C\u002Fcode> writes a client on Spring&#39;s own HTTP clients. The \u003Ccode>spring\u003C\u002Fcode> generator writes server stubs, the other direction.\u003C\u002Fp>","Yes: -g java with --library restclient, webclient or resttemplate writes a client on Spring's own HTTP clients. The spring generator writes server stubs, the other direction.",{"q":113,"html":114,"text":115},"Does FastAPI generate an OpenAPI client?","\u003Cp>FastAPI writes an OpenAPI spec from your own Python code, and OpenAPI Generator&#39;s \u003Ccode>python-fastapi\u003C\u002Fcode> target writes a FastAPI server. To call this API from a FastAPI app, generate a Python client with openapi-python-client or \u003Ccode>-g python\u003C\u002Fcode> and use it inside your endpoints, with the key on your server.\u003C\u002Fp>","FastAPI writes an OpenAPI spec from your own Python code, and OpenAPI Generator's python-fastapi target writes a FastAPI server. To call this API from a FastAPI app, generate a Python client with openapi-python-client or -g python and use it inside your endpoints, with the key on your server.",{"q":117,"html":118,"text":119},"Why are model ids plain strings in the generated client?","\u003Cp>Models, prices and options change more often than the endpoints, so the spec leaves them open and \u003Ccode>GET \u002Fv1\u002Fmodels\u003C\u002Fcode> lists them at run time. Your client keeps compiling when the catalog grows, and a model id the API does not know is refused with \u003Ccode>model_not_found\u003C\u002Fcode>.\u003C\u002Fp>","Models, prices and options change more often than the endpoints, so the spec leaves them open and GET \u002Fv1\u002Fmodels lists them at run time. Your client keeps compiling when the catalog grows, and a model id the API does not know is refused with model_not_found.",[121,122,123,124,125],{"q":101,"html":102,"text":103},{"q":105,"html":106,"text":107},{"q":109,"html":110,"text":111},{"q":113,"html":114,"text":115},{"q":117,"html":118,"text":119},[127,135,142],{"slug":128,"path":129,"title":130,"description":131,"category":9,"categoryLabel":10,"date":11,"updated":11,"readingMinutes":12,"models":132,"featured":15},"ai-api-rate-limits-429","\u002Fblog\u002Fai-api-rate-limits-429","AI API Rate Limits and 429s for Image and Video Jobs","How an AI API rate limit works for image and video jobs: requests a minute versus jobs at once, the headers, Retry-After, and a queue that avoids 429s.",[14,133,134],"nano-banana-pro","veo-3-1",{"slug":136,"path":137,"title":138,"description":139,"category":9,"categoryLabel":10,"date":11,"updated":11,"readingMinutes":140,"models":141,"featured":15},"ai-video-api-error-codes","\u002Fblog\u002Fai-video-api-error-codes","AI Video API Error Codes: What to Retry","AI video API error codes explained: what each status and code means, which to retry, which cost nothing, and a retry loop that never pays twice.",6,[14,134],{"slug":143,"path":144,"title":145,"description":146,"category":9,"categoryLabel":10,"date":11,"updated":11,"readingMinutes":140,"models":147,"featured":15},"ai-video-api-webhooks","\u002Fblog\u002Fai-video-api-webhooks","AI Video API Webhooks: Stop Polling for Finished Clips","How an AI video API webhook works: two events, signed deliveries, retries, signature checks in Node and Python, and what to do when one is missed.",[14,134],"\u002Fstudio",[150,169,178,188,214,231,250,266,281,296,311,325,336,350,363,376,389,400,408,417,427,435,445,453,472],{"id":151,"type":152,"name":153,"description":154,"maker":155,"family":155,"own":156,"image":157,"private":168},"fp-image-2","image","Frameport Image 2","Photoreal renders, up to 4 reference images.","Frameport",true,{"pricing":158,"options":160},{"per_image":159,"per_extra_reference_image":-1},0.025,{"aspect_ratios":161,"max_images":167},[162,163,164,165,166],"1:1","3:4","4:3","9:16","16:9",4,{},{"id":170,"type":152,"name":171,"description":172,"maker":155,"family":155,"own":156,"image":173,"private":177},"fp-image-3","Frameport Image 3","Clean photoreal renders for characters.",{"pricing":174,"options":175},{"per_image":159,"per_extra_reference_image":-1},{"aspect_ratios":176,"max_images":167},[162,163,164,165,166],{},{"id":179,"type":152,"name":180,"description":181,"maker":155,"family":155,"own":156,"image":182,"private":187},"fp-image-1","Frameport Image 1","Generation and reference-driven renders, up to 10 reference images.",{"pricing":183,"options":185},{"per_image":159,"per_extra_reference_image":184},0.0025,{"aspect_ratios":186,"max_images":167},[162,163,164,165,166],{},{"id":189,"type":190,"name":191,"description":192,"maker":155,"family":193,"own":156,"video":194,"private":212},"fp-motion-1","video","Frameport Motion 1","Our video engine, with native sound.","Frameport Motion",{"pricing":195,"options":202},{"default_resolution":196,"per_second":197,"per_second_with_audio":-1,"aspect_ratio_multiplier":-1,"per_reference_image":-1,"per_frame_image":-1},"768p",{"480p":198,"768p":199,"1080p":200,"2K":201},0.02,0.06,0.08,0.095,{"resolutions":203,"durations":207,"aspect_ratios":210,"audio_toggle":156,"start_frame":156,"end_frame":156,"max_reference_images":167,"identity_resolutions":211,"seed":15,"negative_prompt":15},[204,196,205,206],"480p","1080p","2K",{"min":12,"max":208,"step":209},15,1,[166,165,162,164,163],[196,205],{"resolutions":213},[204,196],{"id":14,"type":190,"name":215,"description":216,"maker":217,"family":218,"own":15,"video":219},"Seedance 2.5","The long-take flagship — up to 30 seconds with sound","ByteDance","Seedance",{"pricing":220,"options":225},{"default_resolution":221,"per_second":222,"per_second_with_audio":-1,"aspect_ratio_multiplier":-1,"per_reference_image":-1,"per_frame_image":-1},"720p",{"480p":223,"720p":224},0.12,0.27,{"resolutions":226,"durations":227,"aspect_ratios":229,"audio_toggle":156,"start_frame":156,"end_frame":156,"max_reference_images":167,"identity_resolutions":-1,"seed":156,"negative_prompt":15},[204,221],{"min":167,"max":228,"step":209},30,[166,164,162,163,165,230],"21:9",{"id":134,"type":190,"name":232,"description":233,"maker":234,"family":235,"own":15,"video":236},"Veo 3.1","Google’s flagship — up to 4K with native audio","Google","Veo",{"pricing":237,"options":243},{"default_resolution":205,"per_second":238,"per_second_with_audio":241,"aspect_ratio_multiplier":-1,"per_reference_image":-1,"per_frame_image":-1},{"720p":239,"1080p":239,"4K":240},0.235,0.465,{"720p":240,"1080p":240,"4K":242},0.695,{"resolutions":244,"durations":246,"aspect_ratios":248,"audio_toggle":156,"start_frame":156,"end_frame":156,"max_reference_images":249,"identity_resolutions":-1,"seed":156,"negative_prompt":156},[221,205,245],"4K",{"min":167,"max":247,"step":34},8,[166,165],3,{"id":251,"type":190,"name":252,"description":253,"maker":217,"family":218,"own":15,"video":254},"seedance-2-0","Seedance 2.0","Character consistency, up to 4K",{"pricing":255,"options":262},{"default_resolution":221,"per_second":256,"per_second_with_audio":-1,"aspect_ratio_multiplier":260,"per_reference_image":-1,"per_frame_image":-1},{"480p":200,"720p":257,"1080p":258,"4K":259},0.175,0.435,0.9,{"21:9":261},1.32,{"resolutions":263,"durations":264,"aspect_ratios":265,"audio_toggle":156,"start_frame":156,"end_frame":156,"max_reference_images":167,"identity_resolutions":-1,"seed":156,"negative_prompt":15},[204,221,205,245],{"min":167,"max":208,"step":209},[166,164,162,163,165,230],{"id":267,"type":190,"name":268,"description":269,"maker":270,"family":271,"own":15,"video":272},"hailuo-3","Hailuo 3","2K cinematic physics, subject references","MiniMax","Hailuo",{"pricing":273,"options":277},{"default_resolution":206,"per_second":274,"per_second_with_audio":-1,"aspect_ratio_multiplier":-1,"per_reference_image":276,"per_frame_image":-1},{"2K":275},0.15,0.047,{"resolutions":278,"durations":279,"aspect_ratios":280,"audio_toggle":156,"start_frame":156,"end_frame":156,"max_reference_images":249,"identity_resolutions":-1,"seed":15,"negative_prompt":15},[206],{"min":12,"max":208,"step":209},[230,166,164,162,163,165],{"id":282,"type":190,"name":283,"description":284,"maker":285,"family":285,"own":15,"video":286},"runway-gen-4-5","Runway Gen-4.5","Cinematic motion, strong prompt adherence","Runway",{"pricing":287,"options":290},{"default_resolution":221,"per_second":288,"per_second_with_audio":-1,"aspect_ratio_multiplier":-1,"per_reference_image":-1,"per_frame_image":-1},{"720p":289},0.14,{"resolutions":291,"durations":292,"aspect_ratios":294,"audio_toggle":15,"start_frame":156,"end_frame":15,"max_reference_images":295,"identity_resolutions":-1,"seed":156,"negative_prompt":15},[221],{"min":34,"max":293,"step":209},10,[166,165],0,{"id":297,"type":190,"name":298,"description":299,"maker":234,"family":235,"own":15,"video":300},"veo-3-1-fast","Veo 3.1 Fast","Veo quality, faster and a quarter of the price",{"pricing":301,"options":307},{"default_resolution":221,"per_second":302,"per_second_with_audio":305,"aspect_ratio_multiplier":-1,"per_reference_image":-1,"per_frame_image":-1},{"720p":303,"1080p":223,"4K":304},0.093,0.29,{"720p":223,"1080p":289,"4K":306},0.35,{"resolutions":308,"durations":309,"aspect_ratios":310,"audio_toggle":156,"start_frame":156,"end_frame":156,"max_reference_images":249,"identity_resolutions":-1,"seed":156,"negative_prompt":156},[221,205,245],{"min":167,"max":247,"step":34},[166,165],{"id":312,"type":190,"name":313,"description":314,"maker":217,"family":218,"own":15,"video":315},"seedance-2-0-fast","Seedance 2.0 Fast","Seedance references and sound, faster",{"pricing":316,"options":321},{"default_resolution":221,"per_second":317,"per_second_with_audio":-1,"aspect_ratio_multiplier":320,"per_reference_image":-1,"per_frame_image":-1},{"480p":318,"720p":319},0.063,0.145,{"21:9":261},{"resolutions":322,"durations":323,"aspect_ratios":324,"audio_toggle":156,"start_frame":156,"end_frame":156,"max_reference_images":167,"identity_resolutions":-1,"seed":156,"negative_prompt":15},[204,221],{"min":167,"max":208,"step":209},[166,164,162,163,165,230],{"id":326,"type":190,"name":327,"description":328,"maker":270,"family":271,"own":15,"video":329},"hailuo-3-max","Hailuo 3 Max","Fast Hailuo motion, 768p",{"pricing":330,"options":332},{"default_resolution":196,"per_second":331,"per_second_with_audio":-1,"aspect_ratio_multiplier":-1,"per_reference_image":-1,"per_frame_image":-1},{"480p":199,"768p":303},{"resolutions":333,"durations":334,"aspect_ratios":335,"audio_toggle":15,"start_frame":156,"end_frame":156,"max_reference_images":295,"identity_resolutions":-1,"seed":15,"negative_prompt":15},[204,196],{"min":12,"max":208,"step":209},[230,166,164,162,163,165],{"id":337,"type":190,"name":338,"description":339,"maker":340,"family":338,"own":15,"video":341},"grok-imagine","Grok Imagine","Quick clips from a prompt or a start image","xAI",{"pricing":342,"options":346},{"default_resolution":221,"per_second":343,"per_second_with_audio":-1,"aspect_ratio_multiplier":-1,"per_reference_image":-1,"per_frame_image":345},{"480p":303,"720p":344,"1080p":304},0.165,0.014,{"resolutions":347,"durations":348,"aspect_ratios":349,"audio_toggle":15,"start_frame":156,"end_frame":15,"max_reference_images":295,"identity_resolutions":-1,"seed":15,"negative_prompt":15},[204,221,205],{"min":209,"max":208,"step":209},[166,165,162,164,163],{"id":351,"type":190,"name":352,"description":-1,"maker":217,"family":218,"own":15,"video":353},"seedance-2-0-mini","Seedance 2.0 Mini",{"pricing":354,"options":359},{"default_resolution":204,"per_second":355,"per_second_with_audio":-1,"aspect_ratio_multiplier":358,"per_reference_image":-1,"per_frame_image":-1},{"480p":356,"720p":357},0.041,0.088,{"21:9":261},{"resolutions":360,"durations":361,"aspect_ratios":362,"audio_toggle":156,"start_frame":156,"end_frame":156,"max_reference_images":167,"identity_resolutions":-1,"seed":156,"negative_prompt":15},[204,221],{"min":167,"max":208,"step":209},[166,164,162,163,165,230],{"id":364,"type":190,"name":365,"description":366,"maker":234,"family":235,"own":15,"video":367},"veo-3-1-lite","Veo 3.1 Lite","Veo with sound, on every account",{"pricing":368,"options":372},{"default_resolution":221,"per_second":369,"per_second_with_audio":371,"aspect_ratio_multiplier":-1,"per_reference_image":-1,"per_frame_image":-1},{"720p":370,"1080p":199},0.036,{"720p":199,"1080p":303},{"resolutions":373,"durations":374,"aspect_ratios":375,"audio_toggle":156,"start_frame":156,"end_frame":156,"max_reference_images":295,"identity_resolutions":-1,"seed":156,"negative_prompt":156},[221,205],{"min":167,"max":247,"step":34},[166,165],{"id":377,"type":190,"name":378,"description":379,"maker":380,"family":381,"own":15,"video":382},"wan-3","Wan 3.0","Up to 30 seconds, references and sound","Alibaba","Wan",{"pricing":383,"options":385},{"default_resolution":221,"per_second":384,"per_second_with_audio":-1,"aspect_ratio_multiplier":-1,"per_reference_image":-1,"per_frame_image":-1},{"480p":199,"720p":223,"1080p":239},{"resolutions":386,"durations":387,"aspect_ratios":388,"audio_toggle":156,"start_frame":156,"end_frame":15,"max_reference_images":249,"identity_resolutions":-1,"seed":156,"negative_prompt":15},[204,221,205],{"min":34,"max":228,"step":209},[166,164,162,163,165],{"id":390,"type":152,"name":391,"description":392,"maker":393,"family":394,"own":15,"image":395},"gpt-image-2-5-sunburst","GPT Image 2.5 Sunburst","OpenAI's flagship — precise text, composition and control","OpenAI","GPT Image",{"pricing":396,"options":398},{"per_image":397,"per_extra_reference_image":-1},0.085,{"aspect_ratios":399,"max_images":167},[162,163,164,165,166],{"id":401,"type":152,"name":402,"description":403,"maker":393,"family":394,"own":15,"image":404},"gpt-image-2-5-flare","GPT Image 2.5 Flare","OpenAI's image model tuned for expressive, dramatic frames",{"pricing":405,"options":406},{"per_image":397,"per_extra_reference_image":-1},{"aspect_ratios":407,"max_images":167},[162,163,164,165,166],{"id":409,"type":152,"name":410,"description":411,"maker":234,"family":412,"own":15,"image":413},"nano-banana-2-1","Nano Banana 2.1","Google's fast multimodal image model","Nano Banana",{"pricing":414,"options":415},{"per_image":397,"per_extra_reference_image":-1},{"aspect_ratios":416,"max_images":167},[162,163,164,165,166],{"id":418,"type":152,"name":419,"description":420,"maker":217,"family":421,"own":15,"image":422},"seedream-5-0-pro","Seedream 5.0 Pro","ByteDance's flagship — rich detail and texture","Seedream",{"pricing":423,"options":425},{"per_image":424,"per_extra_reference_image":-1},0.099,{"aspect_ratios":426,"max_images":167},[162,163,164,165,166],{"id":133,"type":152,"name":428,"description":429,"maker":234,"family":412,"own":15,"image":430},"Nano Banana Pro","Google's highest-fidelity image model",{"pricing":431,"options":433},{"per_image":432,"per_extra_reference_image":-1},0.16,{"aspect_ratios":434,"max_images":167},[162,163,164,165,166],{"id":436,"type":152,"name":437,"description":438,"maker":439,"family":440,"own":15,"image":441},"flux-3-image","Flux 3 Image","Black Forest Labs' FLUX.3 — photoreal and typography","Black Forest Labs","Flux",{"pricing":442,"options":443},{"per_image":357,"per_extra_reference_image":-1},{"aspect_ratios":444,"max_images":167},[162,163,164,165,166],{"id":446,"type":152,"name":447,"description":448,"maker":340,"family":338,"own":15,"image":449},"grok-imagine-2-0","Grok Imagine 2.0","xAI's fast, characterful image model",{"pricing":450,"options":451},{"per_image":357,"per_extra_reference_image":-1},{"aspect_ratios":452,"max_images":167},[162,163,164,165,166],{"id":454,"type":190,"name":455,"description":456,"maker":155,"family":457,"own":156,"edit":458,"video":466},"fp-replace-1","Frameport Replace 1","Up to four people in your clip replaced by the faces you send: moves, lips, scene and sound kept.","Frameport Replace",{"tool":459,"formats":460,"min_seconds":34,"max_seconds":293,"min_billed_seconds":34,"max_bytes":463,"max_frames":464,"fps":465,"max_faces":167},"replace",[461,462],"mp4","mov",64000000,600,24,{"pricing":467,"options":470},{"default_resolution":196,"per_second":468,"per_second_with_audio":-1,"aspect_ratio_multiplier":-1,"per_reference_image":-1,"per_frame_image":-1},{"768p":223,"1080p":469},0.25,{"resolutions":471,"durations":-1,"aspect_ratios":-1,"audio_toggle":-1,"start_frame":-1,"end_frame":-1,"max_reference_images":-1,"identity_resolutions":-1,"seed":-1,"negative_prompt":-1},[196,205],{"id":473,"type":190,"name":474,"description":475,"maker":155,"family":476,"own":156,"edit":477,"video":482},"fp-upscale-1","Frameport Upscale 1","Your clip at 1080p or 2K: the same motion, frame rate and sound, sharper detail.","Frameport Upscale",{"tool":478,"formats":479,"min_seconds":209,"max_seconds":228,"min_billed_seconds":12,"max_bytes":480,"max_frames":481,"fps":-1,"max_faces":-1},"upscale",[461,462],100000000,900,{"pricing":483,"options":487},{"default_resolution":205,"per_second":484,"per_second_with_audio":-1,"aspect_ratio_multiplier":-1,"per_reference_image":-1,"per_frame_image":-1},{"1080p":485,"2K":486},0.03,0.05,{"resolutions":488,"durations":-1,"aspect_ratios":-1,"audio_toggle":-1,"start_frame":-1,"end_frame":-1,"max_reference_images":-1,"identity_resolutions":-1,"seed":-1,"negative_prompt":-1},[205,206],1795901826043,"b270fb84-a112-44f2-9801-f99d6c2e889e"]